diff --git a/odoo-debrand/README.rst b/odoo-debrand/README.rst new file mode 100644 index 0000000..634d276 --- /dev/null +++ b/odoo-debrand/README.rst @@ -0,0 +1,53 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +=============== +Odoo Debranding +=============== + +Debranding of odoo with the given configurations under Website Admin -> Debranding Configurations. +Will replace: + + - Page Title + - Login Page Modification + - User Drop down Odoo links + - POS Odoo logo replaced by company logo + - Odoo Database Selector Logo, Labels + +Installation +============ +- www.odoo.com/documentation/13.0/setup/install.html +- Install our custom addon + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: + V13 Atul Varma + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ + + diff --git a/odoo-debrand/__init__.py b/odoo-debrand/__init__.py new file mode 100644 index 0000000..0bc1795 --- /dev/null +++ b/odoo-debrand/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies() +# Author: Tintuk Tomin() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from . import controllers +from . import models diff --git a/odoo-debrand/__manifest__.py b/odoo-debrand/__manifest__.py new file mode 100644 index 0000000..37544e9 --- /dev/null +++ b/odoo-debrand/__manifest__.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies() +# Author: Tintuk Tomin() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# + +{ + 'name': "Odoo Debranding", + 'version': "13.0.1.3.3", + 'summary': """Odoo Backend and Front end Debranding""", + 'description': """Debrand Odoo,Debranding, odoo13""", + 'live_test_url': 'https://www.youtube.com/watch?v=fYSPARjmYA4', + 'author': "Cybrosys Techno Solutions", + 'company': "Cybrosys Techno Solutions", + 'maintainer': "Cybrosys Techno Solutions", + 'website': "https://cybrosys.com/", + 'category': 'Tools', + 'depends': ['website', 'base_setup'], + 'data': [ + 'views/views.xml', + 'views/res_config_views.xml', + 'views/ir_module_views.xml' + ], + 'qweb': ["static/src/xml/base.xml", + "static/src/xml/res_config_edition.xml"], + 'images': ['static/description/banner.gif'], + 'license': "AGPL-3", + 'installable': True, + 'application': False +} diff --git a/odoo-debrand/__pycache__/__init__.cpython-36.pyc b/odoo-debrand/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..3678e9e Binary files /dev/null and b/odoo-debrand/__pycache__/__init__.cpython-36.pyc differ diff --git a/odoo-debrand/controllers/__init__.py b/odoo-debrand/controllers/__init__.py new file mode 100644 index 0000000..8a47105 --- /dev/null +++ b/odoo-debrand/controllers/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Tintuk Tomin() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from . import controllers \ No newline at end of file diff --git a/odoo-debrand/controllers/__pycache__/__init__.cpython-36.pyc b/odoo-debrand/controllers/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..1f25061 Binary files /dev/null and b/odoo-debrand/controllers/__pycache__/__init__.cpython-36.pyc differ diff --git a/odoo-debrand/controllers/__pycache__/controllers.cpython-36.pyc b/odoo-debrand/controllers/__pycache__/controllers.cpython-36.pyc new file mode 100644 index 0000000..c38df28 Binary files /dev/null and b/odoo-debrand/controllers/__pycache__/controllers.cpython-36.pyc differ diff --git a/odoo-debrand/controllers/controllers.py b/odoo-debrand/controllers/controllers.py new file mode 100644 index 0000000..7cf1360 --- /dev/null +++ b/odoo-debrand/controllers/controllers.py @@ -0,0 +1,147 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies( +# ). +# Author: Tintuk Tomin() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# + +import base64 +import functools +import io +import json + +from odoo.http import request +from odoo.modules import get_resource_path +from odoo.tools.mimetypes import guess_mimetype + +import jinja2 +import odoo +import os +import sys +from odoo import http +from odoo.addons.web.controllers import main +from odoo.addons.web.controllers.main import Binary +from odoo.addons.web.controllers.main import Database + +if hasattr(sys, 'frozen'): + # When running on compiled windows binary, we don't have access to + # package loader. + path = os.path.realpath( + os.path.join(os.path.dirname(__file__), '..', 'views')) + loader = jinja2.FileSystemLoader(path) +else: + loader = jinja2.PackageLoader('odoo.addons.odoo-debrand', "views") +env = main.jinja2.Environment(loader=loader, autoescape=True) +env.filters["json"] = json.dumps +db_monodb = http.db_monodb +DBNAME_PATTERN = '^[a-zA-Z0-9][a-zA-Z0-9_.-]+$' + + +class BinaryCustom(Binary): + @http.route([ + '/web/binary/company_logo', + '/logo', + '/logo.png', + ], type='http', auth="none") + def company_logo(self, dbname=None, **kw): + imgname = 'logo' + imgext = '.png' + placeholder = functools.partial(get_resource_path, 'web', 'static', + 'src', 'img') + uid = None + if request.session.db: + dbname = request.session.db + uid = request.session.uid + elif dbname is None: + dbname = db_monodb() + + if not uid: + uid = odoo.SUPERUSER_ID + + if not dbname: + response = http.send_file(placeholder(imgname + imgext)) + else: + try: + # create an empty registry + registry = odoo.modules.registry.Registry(dbname) + with registry.cursor() as cr: + company = int(kw['company']) if kw and kw.get( + 'company') else False + if company: + cr.execute("""SELECT logo_web, write_date + FROM res_company + WHERE id = %s + """, (company,)) + else: + cr.execute("""SELECT c.logo_web, c.write_date + FROM res_users u + LEFT JOIN res_company c + ON c.id = u.company_id + WHERE u.id = %s + """, (uid,)) + row = cr.fetchone() + if row and row[0]: + image_base64 = base64.b64decode(row[0]) + image_data = io.BytesIO(image_base64) + mimetype = guess_mimetype(image_base64, + default='image/png') + imgext = '.' + mimetype.split('/')[1] + if imgext == '.svg+xml': + imgext = '.svg' + + response = http.send_file(image_data, + filename=imgname + imgext, + mimetype=mimetype, + mtime=row[1]) + else: + response = http.send_file(placeholder('nologo.png')) + except Exception: + response = http.send_file(placeholder(imgname + imgext)) + + return response + + +class OdooDebrand(Database): + + def _render_template(self, **d): + + d.setdefault('manage', True) + d['insecure'] = odoo.tools.config.verify_admin_password('admin') + d['list_db'] = odoo.tools.config['list_db'] + d['langs'] = odoo.service.db.exp_list_lang() + d['countries'] = odoo.service.db.exp_list_countries() + d['pattern'] = DBNAME_PATTERN + website_id = request.env['website'].sudo().search([]) + d['website_name'] = website_id and website_id[0].name or '' + d['company_name'] = website_id and website_id[0].company_id.name or '' + d['favicon'] = website_id and website_id[0].favicon_url or '' + d['company_logo_url'] = website_id and website_id[ + 0].company_logo_url or '' + + # databases list + d['databases'] = [] + try: + d['databases'] = http.db_list() + d['incompatible_databases'] = odoo.service.db.list_db_incompatible( + d['databases']) + except odoo.exceptions.AccessDenied: + monodb = db_monodb() + if monodb: + d['databases'] = [monodb] + return env.get_template("database_manager_extend.html").render(d) diff --git a/odoo-debrand/doc/RELEASE_NOTES.md b/odoo-debrand/doc/RELEASE_NOTES.md new file mode 100644 index 0000000..4c0ee0a --- /dev/null +++ b/odoo-debrand/doc/RELEASE_NOTES.md @@ -0,0 +1,11 @@ +## Module + +#### 17.10.2019 +#### Version 13.0.1.0.0 +#### ADD +Initial Commit for odoo-debrand + +#### 17.10.2019 +#### Version 13.0.1.3.3 +#### UPDT +License section restored. diff --git a/odoo-debrand/models/__init__.py b/odoo-debrand/models/__init__.py new file mode 100644 index 0000000..8d2860c --- /dev/null +++ b/odoo-debrand/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies() +# Author: Tintuk Tomin() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from . import models diff --git a/odoo-debrand/models/__pycache__/__init__.cpython-36.pyc b/odoo-debrand/models/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..8fe12a1 Binary files /dev/null and b/odoo-debrand/models/__pycache__/__init__.cpython-36.pyc differ diff --git a/odoo-debrand/models/__pycache__/models.cpython-36.pyc b/odoo-debrand/models/__pycache__/models.cpython-36.pyc new file mode 100644 index 0000000..5f540f8 Binary files /dev/null and b/odoo-debrand/models/__pycache__/models.cpython-36.pyc differ diff --git a/odoo-debrand/models/models.py b/odoo-debrand/models/models.py new file mode 100644 index 0000000..3cf17bb --- /dev/null +++ b/odoo-debrand/models/models.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Tintuk Tomin() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from odoo import models, fields, api, tools + + +class OdooDebrand(models.Model): + """ + Fields to access from the database manager. + """ + _inherit = "website" + + def get_company_logo(self): + self.company_logo_url ="/web/image/res.company/%s/logo"%(self.id) + + def get_favicon(self): + id = self.env['website'].sudo().search([]) + self.favicon_url ="/web/image/website/%s/favicon"%(id[0].id) + + favicon_url = fields.Text("Url", compute='get_favicon') + company_logo_url = fields.Text("Url", compute='get_company_logo') diff --git a/odoo-debrand/static/description/banner.gif b/odoo-debrand/static/description/banner.gif new file mode 100644 index 0000000..35de4e2 Binary files /dev/null and b/odoo-debrand/static/description/banner.gif differ diff --git a/odoo-debrand/static/description/banner_old.png b/odoo-debrand/static/description/banner_old.png new file mode 100644 index 0000000..9220a95 Binary files /dev/null and b/odoo-debrand/static/description/banner_old.png differ diff --git a/odoo-debrand/static/description/cybro_logo.png b/odoo-debrand/static/description/cybro_logo.png new file mode 100644 index 0000000..bb30911 Binary files /dev/null and b/odoo-debrand/static/description/cybro_logo.png differ diff --git a/odoo-debrand/static/description/icon.png b/odoo-debrand/static/description/icon.png new file mode 100644 index 0000000..e2edaed Binary files /dev/null and b/odoo-debrand/static/description/icon.png differ diff --git a/odoo-debrand/static/description/images/checked.png b/odoo-debrand/static/description/images/checked.png new file mode 100644 index 0000000..578cedb Binary files /dev/null and b/odoo-debrand/static/description/images/checked.png differ diff --git a/odoo-debrand/static/description/images/cybrosys.png b/odoo-debrand/static/description/images/cybrosys.png new file mode 100644 index 0000000..d76b5ba Binary files /dev/null and b/odoo-debrand/static/description/images/cybrosys.png differ diff --git a/odoo-debrand/static/description/images/debranding-01.png b/odoo-debrand/static/description/images/debranding-01.png new file mode 100644 index 0000000..bc26f0d Binary files /dev/null and b/odoo-debrand/static/description/images/debranding-01.png differ diff --git a/odoo-debrand/static/description/images/debranding-02.png b/odoo-debrand/static/description/images/debranding-02.png new file mode 100644 index 0000000..c466467 Binary files /dev/null and b/odoo-debrand/static/description/images/debranding-02.png differ diff --git a/odoo-debrand/static/description/images/debranding-03.png b/odoo-debrand/static/description/images/debranding-03.png new file mode 100644 index 0000000..e199e3b Binary files /dev/null and b/odoo-debrand/static/description/images/debranding-03.png differ diff --git a/odoo-debrand/static/description/images/debranding-04.png b/odoo-debrand/static/description/images/debranding-04.png new file mode 100644 index 0000000..ffa4a31 Binary files /dev/null and b/odoo-debrand/static/description/images/debranding-04.png differ diff --git a/odoo-debrand/static/description/images/debranding-05.png b/odoo-debrand/static/description/images/debranding-05.png new file mode 100644 index 0000000..21ff537 Binary files /dev/null and b/odoo-debrand/static/description/images/debranding-05.png differ diff --git a/odoo-debrand/static/description/images/debranding-06.png b/odoo-debrand/static/description/images/debranding-06.png new file mode 100644 index 0000000..83c08b6 Binary files /dev/null and b/odoo-debrand/static/description/images/debranding-06.png differ diff --git a/odoo-debrand/static/description/images/debranding_1.gif b/odoo-debrand/static/description/images/debranding_1.gif new file mode 100644 index 0000000..e113fb7 Binary files /dev/null and b/odoo-debrand/static/description/images/debranding_1.gif differ diff --git a/odoo-debrand/static/description/images/odoo debranding.png b/odoo-debrand/static/description/images/odoo debranding.png new file mode 100644 index 0000000..9b8b72f Binary files /dev/null and b/odoo-debrand/static/description/images/odoo debranding.png differ diff --git a/odoo-debrand/static/description/images/odoo-debrand.png b/odoo-debrand/static/description/images/odoo-debrand.png new file mode 100644 index 0000000..ae1c07e Binary files /dev/null and b/odoo-debrand/static/description/images/odoo-debrand.png differ diff --git a/odoo-debrand/static/description/images/order_types_in_pos.png b/odoo-debrand/static/description/images/order_types_in_pos.png new file mode 100644 index 0000000..2554ded Binary files /dev/null and b/odoo-debrand/static/description/images/order_types_in_pos.png differ diff --git a/odoo-debrand/static/description/images/pos_book_order.gif b/odoo-debrand/static/description/images/pos_book_order.gif new file mode 100644 index 0000000..935190d Binary files /dev/null and b/odoo-debrand/static/description/images/pos_book_order.gif differ diff --git a/odoo-debrand/static/description/images/pos_combo_products.png b/odoo-debrand/static/description/images/pos_combo_products.png new file mode 100644 index 0000000..9867303 Binary files /dev/null and b/odoo-debrand/static/description/images/pos_combo_products.png differ diff --git a/odoo-debrand/static/description/images/pos_lot_expiry_warning.png b/odoo-debrand/static/description/images/pos_lot_expiry_warning.png new file mode 100644 index 0000000..ed9d045 Binary files /dev/null and b/odoo-debrand/static/description/images/pos_lot_expiry_warning.png differ diff --git a/odoo-debrand/static/description/images/pos_product_addons.png b/odoo-debrand/static/description/images/pos_product_addons.png new file mode 100644 index 0000000..25d4d79 Binary files /dev/null and b/odoo-debrand/static/description/images/pos_product_addons.png differ diff --git a/odoo-debrand/static/description/images/pos_return.jpeg b/odoo-debrand/static/description/images/pos_return.jpeg new file mode 100644 index 0000000..874a6d3 Binary files /dev/null and b/odoo-debrand/static/description/images/pos_return.jpeg differ diff --git a/odoo-debrand/static/description/images/remove_orders.png b/odoo-debrand/static/description/images/remove_orders.png new file mode 100644 index 0000000..8096e27 Binary files /dev/null and b/odoo-debrand/static/description/images/remove_orders.png differ diff --git a/odoo-debrand/static/description/index.html b/odoo-debrand/static/description/index.html new file mode 100644 index 0000000..1a05756 --- /dev/null +++ b/odoo-debrand/static/description/index.html @@ -0,0 +1,369 @@ + +
cybrosys-logo
+ +
+
+
+

ODOO DEBRANDING

+

Debrand Odoo Back-End + Front-End .

+
+

Key Highlights

+
    +
  • Modify database selector page
  • +
  • Modify login page
  • +
  • Remove 'About' in Configuration
  • +
  • Page title modification
  • +
  • Updated User dropdown List
  • +
  • Company Logo In POS
  • +
+ +
+
+
+
+ + + + + + +
+
+
+ + + +
+
+ +

Overview

+
+

+ Odoo Debranding module helps you to change the aesthetic look of Odoo software via customizing. The module helps you to remove all odoo reference from Front end and Back end.

+ +
+ +

Odoo Debranding

+
+
    + +

    + Available in Odoo 13.0 community edition.

    + +

    + Modify database selector page.

    + +

    + Modify login page (Remove 'Powered by odoo').

    + +

    + Page title modification (Remove Odoo from Title)

    + +

    + Updated User dropdown List (Remove 'Accounts and Documentation')

    +

    + Remove About from Configuration menu.

    + +
+
+ + + +
+ +
+

Screenshots

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

Video

+
+

Odoo debranding Demo

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

Suggested Products

+
+ +
+ + +
+

Our Service

+
+ +
+
+
+

Our Industries

+
+ +
+
+
+ +
+
+

Trading

+

Easily procure and sell your products.

+
+
+
+
+ +
+
+

Manufacturing

+

Plan, track and schedule your operations.

+
+
+
+
+ +
+
+

Restaurant

+

Run your bar or restaurant methodical.

+
+
+
+
+ +
+
+

POS

+

Easy configuring and convivial selling.

+
+
+
+
+ +
+
+

E-commerce & Website

+

Mobile friendly, awe-inspiring product pages.

+
+
+
+
+ +
+
+

Hotel Management

+

An all-inclusive hotel management application.

+
+
+
+
+ +
+
+

Education

+

A Collaborative platform for educational management.

+
+
+
+
+ +
+
+

Service Management

+

Keep track of services and invoice accordingly.

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

Need Any Help?

+
+ +

If you have anything to share with us based on your use of this module, please let us know. We are ready to offer our support.

+
+

Email us

+

odoo@cybrosys.com / info@cybrosys.com

+ +
+
+

Contact Us

+ www.cybrosys.com +
+
+ +
+
+ + +
+
+
+ + + + +
+
+ +
+ + + + + + + + +
+
+
+
+ diff --git a/odoo-debrand/static/src/js/title.js b/odoo-debrand/static/src/js/title.js new file mode 100644 index 0000000..78f3a3d --- /dev/null +++ b/odoo-debrand/static/src/js/title.js @@ -0,0 +1,93 @@ +odoo.define('odoo-debrand.title', function(require) { +"use strict"; + +var core = require('web.core'); +var utils = require('web.utils'); +var ajax = require('web.ajax'); +var Dialog = require('web.Dialog'); +var WebClient = require('web.AbstractWebClient'); +var CrashManager = require('web.CrashManager'); // We can import crash_manager also +var concurrency = require('web.concurrency'); +var mixins = require('web.mixins'); +var session = require('web.session'); +var Widget = require('web.Widget'); +var QWeb = core.qweb; +var _t = core._t; +var _lt = core._lt; +var name = " "; + + +var map_title ={ + user_error: _lt('Warning'), + warning: _lt('Warning'), + access_error: _lt('Access Error'), + missing_error: _lt('Missing Record'), + validation_error: _lt('Validation Error'), + except_orm: _lt('Global Business Error'), + access_denied: _lt('Access Denied'), +}; + +var myWebClient = WebClient.include({ + + start: function () { + this._super(); + var domain = session.user_context.allowed_company_ids; + var obj = this; + this._rpc({ + fields: ['name','id',], + domain: [['id', 'in', domain]], + model: 'res.company', + method: 'search_read', + }) + .then(function (result) { + obj.set('title_part', {"zopenerp": result[0].name}); // Replacing the name 'Oodo' to selected company name near favicon + }); + }, +}); + +var ExceptionHandler = { + init: function(parent, error) {}, + display: function() {}, +}; + +var RedirectWarningHandler = Widget.extend(ExceptionHandler, { // Rewriting the exception handler + init: function(parent, error) { + this._super(parent); + this.error = error; + }, + display: function() { + var self = this; + var error = this.error; + + new WarningDialog(this, { + title: _.str.capitalize(error.type) || _t("Warning"), // Replacing 'Odoo Warning' to 'Warning' + buttons: [ + {text: error.data.arguments[2], classes : "btn-primary", click: function() { + $.bbq.pushState({ + 'action': error.data.arguments[1], + 'cids': $.bbq.getState().cids, + }, 2); + self.destroy(); + location.reload(); + }}, + {text: _t("Cancel"), click: function() { self.destroy(); }, close: true} + ] + }, { + message: error.data.arguments[0], + }).open(); + } +}); + +core.crash_registry.add('odoo.exceptions.RedirectWarning', RedirectWarningHandler); + + +function session_expired(cm) { + return { + display: function () { // Replace 'Odoo session expired' to 'Session Expired' + cm.show_warning({type: _t("Session Expired"), data: {message: _t("Your Session expired. Please refresh the current web page.")}}); + } + }; +} +core.crash_registry.add('odoo.http.SessionExpiredException', session_expired); + +}); diff --git a/odoo-debrand/static/src/xml/base.xml b/odoo-debrand/static/src/xml/base.xml new file mode 100644 index 0000000..c791507 --- /dev/null +++ b/odoo-debrand/static/src/xml/base.xml @@ -0,0 +1,26 @@ + + + + + + +