diff --git a/developer_mode/README.rst b/developer_mode/README.rst new file mode 100644 index 000000000..4e3a93258 --- /dev/null +++ b/developer_mode/README.rst @@ -0,0 +1,21 @@ +================================ + Automatic Developer Mode v11 +================================ + +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 +------- +* `Niyas Raphy < niyas@cybsosys.in >`__ +* `Saritha S < saritha@cybsosys.in >`__ + + +Further information +=================== +HTML Description: ``__ + diff --git a/developer_mode/__init__.py b/developer_mode/__init__.py new file mode 100644 index 000000000..c1bff0722 --- /dev/null +++ b/developer_mode/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2018-TODAY Cybrosys Technologies(). +# Author: Niyas Raphy () +# +# 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 . +# +################################################################################### + +from . import controllers diff --git a/developer_mode/__manifest__.py b/developer_mode/__manifest__.py new file mode 100644 index 000000000..db295a2f3 --- /dev/null +++ b/developer_mode/__manifest__.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2018-TODAY Cybrosys Technologies(). +# Author: Niyas Raphy () +# +# 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 . +# +################################################################################### + +{ + 'name': "Automatic Developer Mode", + 'summary': """Automatically Activate Developer Mode & Running DB Name on Left Top""", + 'version': '11.0.1.0.0', + 'author': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'company': 'Cybrosys Techno Solutions', + 'category': 'Extra Tools', + 'depends': ['base', 'web', 'base_setup'], + 'data': [ + 'security/security_data.xml', + 'views/developer_mode_view.xml', + 'views/ir_rule_view.xml', + 'data/cybro_developer_data.xml', + ], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, +} diff --git a/developer_mode/controllers/__init__.py b/developer_mode/controllers/__init__.py new file mode 100644 index 000000000..f2f0d856a --- /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: Niyas Raphy () +# +# 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 . +# +################################################################################### + +from . import main diff --git a/developer_mode/controllers/main.py b/developer_mode/controllers/main.py new file mode 100644 index 000000000..fb17da8f7 --- /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: Niyas Raphy () +# +# 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 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' + 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 new file mode 100644 index 000000000..d62bb466a --- /dev/null +++ b/developer_mode/data/cybro_developer_data.xml @@ -0,0 +1,47 @@ + + + + + + + res.partner + cybro_partner_developer_mode + True + + + + Cybro Developer + +****************************************************** + + Your Odoo ERP Consultant! + +****************************************************** + +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 + 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 new file mode 100644 index 000000000..0f27f8933 --- /dev/null +++ b/developer_mode/security/security_data.xml @@ -0,0 +1,12 @@ + + + + + + Odoo Developer + + + + + + diff --git a/developer_mode/static/description/apps_view1.gif b/developer_mode/static/description/apps_view1.gif new file mode 100644 index 000000000..3c7b6f39a Binary files /dev/null and b/developer_mode/static/description/apps_view1.gif differ diff --git a/developer_mode/static/description/apps_view2.gif b/developer_mode/static/description/apps_view2.gif new file mode 100644 index 000000000..63863b66b Binary files /dev/null and b/developer_mode/static/description/apps_view2.gif differ diff --git a/developer_mode/static/description/banner.jpg b/developer_mode/static/description/banner.jpg new file mode 100644 index 000000000..0d748f903 Binary files /dev/null and b/developer_mode/static/description/banner.jpg 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/cybro_logo.png b/developer_mode/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/developer_mode/static/description/cybro_logo.png differ diff --git a/developer_mode/static/description/dev.jpg b/developer_mode/static/description/dev.jpg new file mode 100644 index 000000000..3cef12199 Binary files /dev/null and b/developer_mode/static/description/dev.jpg differ diff --git a/developer_mode/static/description/icon.png b/developer_mode/static/description/icon.png new file mode 100644 index 000000000..d31867890 Binary files /dev/null and b/developer_mode/static/description/icon.png differ diff --git a/developer_mode/static/description/im_login.jpg b/developer_mode/static/description/im_login.jpg new file mode 100644 index 000000000..e98104732 Binary files /dev/null and b/developer_mode/static/description/im_login.jpg differ diff --git a/developer_mode/static/description/index.html b/developer_mode/static/description/index.html new file mode 100644 index 000000000..b5df0d487 --- /dev/null +++ b/developer_mode/static/description/index.html @@ -0,0 +1,127 @@ +
+
+
+

Automatic Developer Mode

+

Developers, Keep up your smile!

+

Author: Cybrosys Technologies

+ +
+
+

Keep smiling for the below reasons:

+
    +
  •    Automatically Trigger Developer Mode.
  • +
  •    Separate Group for 'Odoo Developers'.
  • +
  •    Showing Running DB On Left Top.
  • +
  •    Upgrade Modules Easily.
  • +
+
+
+
+ +
+
+
+

+

This module makes you free from activating developer mode operations repeatedly. + When you login, It will trigger the DEVELOPER MODE automatically.

+

+
+
+
+ +
+
+

Configuration

+
+

+ 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. +

+
+
+
+ +
+
+
+
+ +
+
+
+

+ 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.

+
+
+
+ +
+
+
+
+ +
+
+
+

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..9e894bfcd 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/views/developer_mode_view.xml b/developer_mode/views/developer_mode_view.xml new file mode 100644 index 000000000..5e2dc18dd --- /dev/null +++ b/developer_mode/views/developer_mode_view.xml @@ -0,0 +1,48 @@ + + + + + + ir.module.module.list.select + + ir.module.module + + + + + + + + + + + + + Modules Kanban + + ir.module.module + + + + + + + + + + + + + diff --git a/developer_mode/views/ir_rule_view.xml b/developer_mode/views/ir_rule_view.xml new file mode 100644 index 000000000..998da4513 --- /dev/null +++ b/developer_mode/views/ir_rule_view.xml @@ -0,0 +1,16 @@ + + + + + + ir.rule + + + + + + + + + +