diff --git a/developer_mode/README.rst b/developer_mode/README.rst new file mode 100644 index 000000000..ad5338807 --- /dev/null +++ b/developer_mode/README.rst @@ -0,0 +1,24 @@ +===================================== + Automatic Developer Mode v10 +===================================== +I am a developer. I know our time is very precious. + - Nilmar Shereef + + +Odoo Developers, Keep smiling for the below reasons: + * Automatically Trigger Developer Mode. + * Separate Group for 'Odoo Developers'. + * Showing Running DB On Left Top. + * Upgrade Modules Easily. + * Recently Upgraded Filter. + +Credits +------- +* `Nilmar Shereef < shereef@cybsosys.in >`__ + + +Further information +=================== +HTML Description: ``__ + +Tested on Odoo 10.0 ffba5c688ff74a0630f9f70be1d7760a43a7deba diff --git a/developer_mode/__init__.py b/developer_mode/__init__.py index 06839078f..01e489673 100644 --- a/developer_mode/__init__.py +++ b/developer_mode/__init__.py @@ -1,23 +1,22 @@ # -*- coding: utf-8 -*- -############################################################################## +################################################################################### # # Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2009-TODAY Cybrosys Technologies(). -# Author: Nilmar Shereef() -# you can modify it under the terms of the GNU LESSER -# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# Copyright (C) 2018-TODAY Cybrosys Technologies(). +# Author: Nilmar Shereef () # -# It is forbidden to publish, distribute, sublicense, or sell copies -# of the Software or modified copies of the Software. +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# GNU Affero General Public License for more details. # -# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE -# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. -# If not, see . +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . # -############################################################################## - +################################################################################### +from . import controllers diff --git a/developer_mode/__manifest__.py b/developer_mode/__manifest__.py index a61a10f1e..67576fd46 100644 --- a/developer_mode/__manifest__.py +++ b/developer_mode/__manifest__.py @@ -1,36 +1,34 @@ # -*- coding: utf-8 -*- -############################################################################## +################################################################################### # # Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2017-TODAY Cybrosys Technologies(). -# Author: Nilmar Shereef() -# you can modify it under the terms of the GNU LESSER -# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# Copyright (C) 2018-TODAY Cybrosys Technologies(). +# Author: Nilmar Shereef () # -# It is forbidden to publish, distribute, sublicense, or sell copies -# of the Software or modified copies of the Software. +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# GNU Affero General Public License for more details. # -# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE -# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. -# If not, see . +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . # -############################################################################## +################################################################################### { 'name': "Automatic Developer Mode", 'summary': """Automatically Activate Developer Mode & Running DB Name on Left Top""", - 'version': '10.0.4.0.0', + 'version': '10.0.5.0.0', 'author': 'Cybrosys Techno Solutions', - 'website': "http://www.cybrosys.com", + 'website': "https://www.cybrosys.com", 'company': 'Cybrosys Techno Solutions', 'category': 'Extra Tools', 'depends': ['base', 'web', 'base_setup'], 'data': [ - 'views/web_view.xml', 'security/security_data.xml', 'views/developer_mode_view.xml', 'views/ir_rule_view.xml', diff --git a/developer_mode/controllers/__init__.py b/developer_mode/controllers/__init__.py new file mode 100644 index 000000000..6dd7851c3 --- /dev/null +++ b/developer_mode/controllers/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2018-TODAY Cybrosys Technologies(). +# Author: Nilmar Shereef () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +import main diff --git a/developer_mode/controllers/main.py b/developer_mode/controllers/main.py new file mode 100644 index 000000000..b9cb89d2f --- /dev/null +++ b/developer_mode/controllers/main.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2018-TODAY Cybrosys Technologies(). +# Author: Nilmar Shereef () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### +import odoo +from odoo import http, _ +from odoo.http import route +from odoo.http import request +from odoo.addons.web.controllers.main import Home, ensure_db + + +class AutoDeveloperMode(Home): + + @http.route('/web/login', type='http', auth="none") + def web_login(self, redirect=None, **kw): + """ Controller functions overrides for redirecting to developer mode if the logging user is admin or + 'Odoo Developer' group member """ + ensure_db() + request.params['login_success'] = False + if request.httprequest.method == 'GET' and redirect and request.session.uid: + return http.redirect_with_hash(redirect) + + if not request.uid: + request.uid = odoo.SUPERUSER_ID + + values = request.params.copy() + try: + values['databases'] = http.db_list() + except odoo.exceptions.AccessDenied: + values['databases'] = None + if request.httprequest.method == 'POST': + old_uid = request.uid + uid = request.session.authenticate(request.session.db, request.params['login'], request.params['password']) + if uid is not False: + request.params['login_success'] = True + if not redirect: + odoo_technician = request.env.user.has_group('developer_mode.odoo_developer_group') + if odoo_technician or request.uid == 1: + redirect = '/web?debug=1' + else: + redirect = '/web' + return http.redirect_with_hash(redirect) + request.uid = old_uid + values['error'] = _("Wrong login/password") + return request.render('web.login', values) diff --git a/developer_mode/data/cybro_developer_data.xml b/developer_mode/data/cybro_developer_data.xml index 17368fb19..e5b64d1b2 100644 --- a/developer_mode/data/cybro_developer_data.xml +++ b/developer_mode/data/cybro_developer_data.xml @@ -9,24 +9,32 @@ - Cybrodeveloper - www.cybrosys.com + Cybro Developer ****************************************************** - Your freelance partner! + Your Odoo ERP Consultant! ****************************************************** -Custom development for Odoo is what we do. Talk to us! +Cybrosys provides tremendous scope of Odoo customization where all kinds of business needs can be satisfied and could further enhance later if required with ease. Talk to us! - + - + + Kinfra Techno Park + Neospace + Kakkancherry + 673635 + 673635 + 1 + +91 (0) 4943015006 + +91 (0) 4943015007 + info@cybrsys.com + https://www.cybrosys.com + - - diff --git a/developer_mode/security/security_data.xml b/developer_mode/security/security_data.xml index 5e549fb11..c2686c9c5 100644 --- a/developer_mode/security/security_data.xml +++ b/developer_mode/security/security_data.xml @@ -1,12 +1,10 @@ - Odoo Developer - diff --git a/developer_mode/static/description/apps_view.png b/developer_mode/static/description/apps_view.png deleted file mode 100644 index 1739f7bc5..000000000 Binary files a/developer_mode/static/description/apps_view.png and /dev/null differ diff --git a/developer_mode/static/description/apps_view1.png b/developer_mode/static/description/apps_view1.png new file mode 100644 index 000000000..3d308b78e Binary files /dev/null and b/developer_mode/static/description/apps_view1.png differ diff --git a/developer_mode/static/description/apps_view2.png b/developer_mode/static/description/apps_view2.png new file mode 100644 index 000000000..5d15bb61c Binary files /dev/null and b/developer_mode/static/description/apps_view2.png differ diff --git a/developer_mode/static/description/cybro.jpg b/developer_mode/static/description/cybro.jpg new file mode 100644 index 000000000..28b019bab Binary files /dev/null and b/developer_mode/static/description/cybro.jpg differ diff --git a/developer_mode/static/description/index.html b/developer_mode/static/description/index.html index 3949b42af..aca7c4f94 100644 --- a/developer_mode/static/description/index.html +++ b/developer_mode/static/description/index.html @@ -3,14 +3,16 @@

Automatic Developer Mode

Developers, Keep up your smile!

-

Cybrosys Technologies , www.cybrosys.com

+

Author: Cybrosys Technologies

+

Keep smiling for the below reasons:

  •    Automatically Trigger Developer Mode.
  • +
  •    Separate Group for 'Odoo Developers'.
  •    Showing Running DB On Left Top.
  • -
  •    Update Modules Easily.
  • +
  •    Upgrade Modules Easily.
@@ -27,16 +29,18 @@
-
+
+

Configuration

-

As shown here, Simply automate the developer mode. It helps developer in several perspective. NOTE That, you have to re-login after this module installation

+ Important Notes: You have to enable 'Odoo Developer' group for respective users (Except Admin)in settings & + YOU HAVE TO RE-LOGIN AFTER THE MODULE INSTALLATION.

-
- +
+
@@ -46,12 +50,26 @@

-

The developer can identify running DB easily.

+ As shown here, Simply automate the developer mode. It helps developer in several perspective.

- + +
+
+
+
+ +
+
+
+

Running DB on left Top

+

The developer can identify running DB easily.

+
+
+
+
@@ -59,37 +77,51 @@
-
-

-

Easily update any module without opening the module form.

-

+
+

Simplify Your Clicks

+

Easily upgrade any module without going the module form.

-
+
- +
+
+
+

Recent Upgrades History

+

Recent upgraded filter view in Apps.

+
+
+
+ +
+
+
+
+ +

Need Any Help?

+
+ -
- - - diff --git a/developer_mode/static/description/recent_updates.png b/developer_mode/static/description/recent_updates.png new file mode 100644 index 000000000..619b512f6 Binary files /dev/null and b/developer_mode/static/description/recent_updates.png differ diff --git a/developer_mode/static/description/settings.png b/developer_mode/static/description/settings.png new file mode 100644 index 000000000..0162caa24 Binary files /dev/null and b/developer_mode/static/description/settings.png differ diff --git a/developer_mode/static/description/working_db.png b/developer_mode/static/description/working_db.png deleted file mode 100644 index 2424138bf..000000000 Binary files a/developer_mode/static/description/working_db.png and /dev/null differ diff --git a/developer_mode/views/developer_mode_view.xml b/developer_mode/views/developer_mode_view.xml index fb4dd8b0e..9e3e200b6 100644 --- a/developer_mode/views/developer_mode_view.xml +++ b/developer_mode/views/developer_mode_view.xml @@ -1,6 +1,7 @@ + ir.module.module.list.select @@ -19,68 +20,68 @@ - - ir.module.module.form - - ir.module.module - + + + + + - -