ignore pyc
|
@ -1,35 +0,0 @@
|
|||
=======================
|
||||
Odoo debranding Kit
|
||||
=======================
|
||||
|
||||
In this Module Extra_Modules Folder We Put Two Modules.
|
||||
|
||||
- POS Debranding
|
||||
- Website Debranding
|
||||
|
||||
Below Remove in Odoo:
|
||||
|
||||
1. Deletes Odoo label in footer
|
||||
2. Replaces "Odoo" in page title
|
||||
3. Replaces "Odoo" in help message for empty list
|
||||
4. Deletes Documentation, Support, About links
|
||||
5. Replaces default logo by empty image
|
||||
6. Replaces "Odoo" in Dialog Box
|
||||
7. Replaces "Odoo" in strings marked for translation.
|
||||
8. Replaces default favicon to a custom one
|
||||
9. **Hides Apps menu** (by default, only admin (superuser) can see Apps menu. You could change it via tick "Show Modules Menu" in user's access rights tab)
|
||||
10. Disables server requests to odoo.com (publisher_warranty_url)
|
||||
11. Deletes "My odoo.com account" button
|
||||
12. Deletes Apps and other blocks from Settings/Dashboard
|
||||
13. Replaces "Odoo" in planner
|
||||
14. Replaces footer in planner to a custom one.
|
||||
15. Deletes "Odoo" in a request message for permission desktop notifications
|
||||
|
||||
By default the module replaces "Odoo" to "Your Company/Tag". To configure
|
||||
module open Settings\\System Parameters and modify
|
||||
|
||||
- backend_debranding.new_title (put space in value if you don't need Brand in Title)
|
||||
- backend_debranding.new_name (your Brand)
|
||||
- backend_debranding.favicon_url
|
||||
- backend_debranding.planner_footer
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
from . import controllers
|
||||
|
||||
from odoo import SUPERUSER_ID
|
||||
|
||||
MODULE = '_backend_debranding_v12'
|
||||
|
||||
|
||||
def uninstall_hook(cr, registry):
|
||||
registry['ir.model.data']._module_data_uninstall(cr, SUPERUSER_ID, [MODULE])
|
|
@ -1,33 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
{
|
||||
'name': "Debranding Kit",
|
||||
'version': '12.0.0',
|
||||
'author': 'Planet-Odoo',
|
||||
"support": "http://www.planet-odoo.com/",
|
||||
'category': 'Tools',
|
||||
'depends': [
|
||||
'web',
|
||||
'mail',
|
||||
#'web_settings_dashboard',
|
||||
'portal',
|
||||
|
||||
],
|
||||
'data': [
|
||||
'views/data.xml',
|
||||
'views/views.xml',
|
||||
'views/js.xml',
|
||||
'views/webclient_templates.xml',
|
||||
'security/ir.model.access.csv',
|
||||
|
||||
],
|
||||
'qweb': [
|
||||
'static/src/xml/web.xml',
|
||||
'static/src/xml/dashbord.xml',
|
||||
|
||||
],
|
||||
'images': ['static/description/main.png'],
|
||||
'license': "LGPL-3",
|
||||
'auto_install': False,
|
||||
'installable': True
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import main
|
||||
from . import database_manager
|
|
@ -1,33 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import jinja2
|
||||
import json
|
||||
|
||||
import odoo
|
||||
from odoo import http
|
||||
from odoo.addons.web.controllers.main import DBNAME_PATTERN, db_monodb,\
|
||||
Database as DB
|
||||
|
||||
loader = jinja2.PackageLoader('odoo.addons.backend_debranding_v12',
|
||||
"views")
|
||||
env = jinja2.Environment(loader=loader, autoescape=True)
|
||||
env.filters["json"] = json.dumps
|
||||
|
||||
|
||||
class Database(DB):
|
||||
|
||||
def _render_template(self, **d):
|
||||
d.setdefault('manage', True)
|
||||
d['insecure'] = odoo.tools.config['admin_passwd'] == '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
|
||||
# databases list
|
||||
d['databases'] = []
|
||||
try:
|
||||
d['databases'] = http.db_list()
|
||||
except odoo.exceptions.AccessDenied:
|
||||
monodb = db_monodb()
|
||||
if monodb:
|
||||
d['databases'] = [monodb]
|
||||
return env.get_template("database_manager.html").render(d)
|
|
@ -1,5 +0,0 @@
|
|||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import odoo
|
||||
from odoo import http
|
||||
from odoo.addons.web.controllers.main import Binary
|
||||
import functools
|
||||
from odoo.http import request
|
||||
from odoo.modules import get_module_resource
|
||||
# from cStringIO import StringIO
|
||||
from io import StringIO
|
||||
db_monodb = http.db_monodb
|
||||
|
||||
|
||||
class BinaryCustom(Binary):
|
||||
@http.route([
|
||||
'/web/binary/company_logo',
|
||||
'/logo',
|
||||
'/logo.png',
|
||||
], type='http', auth="none", cors="*")
|
||||
def company_logo(self, dbname=None, **kw):
|
||||
imgname = 'logo.png'
|
||||
default_logo_module = 'backend_debranding_v12'
|
||||
if request.session.db:
|
||||
request.env['ir.config_parameter'].sudo().get_param('backend_debranding_v12.default_logo_module')
|
||||
placeholder = functools.partial(get_module_resource, default_logo_module, 'static', 'src', 'img')
|
||||
# print("--placeholder---",placeholder)
|
||||
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))
|
||||
else:
|
||||
try:
|
||||
# create an empty registry
|
||||
registry = odoo.modules.registry.Registry(dbname)
|
||||
with registry.cursor() as cr:
|
||||
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]:
|
||||
# print("-----str(row[0])",str(row[0]))
|
||||
# print(type(row[0]))
|
||||
# image_data = StringIO(str(row[0].decode('base64')))
|
||||
# print("----row[0].tobytes()=--",row[0].tobytes())
|
||||
image_data = row[0].tobytes().decode('utf-8')
|
||||
response = http.send_file(image_data, filename=imgname, mtime=row[1])
|
||||
else:
|
||||
response = http.send_file(placeholder('nologo.png'))
|
||||
except Exception:
|
||||
response = http.send_file(placeholder(imgname))
|
||||
|
||||
return response
|
||||
|
||||
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * backend_debranding_v11
|
||||
#
|
||||
# Translators:
|
||||
# Niki Waibel, 2018
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-01-24 03:51+0000\n"
|
||||
"PO-Revision-Date: 2018-01-24 03:51+0000\n"
|
||||
"Last-Translator: Niki Waibel, 2018\n"
|
||||
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: backend_debranding_v11
|
||||
#: model:ir.model,name:backend_debranding_v11.model_mail_template
|
||||
msgid "Email Templates"
|
||||
msgstr "E-Mail Vorlagen"
|
||||
|
||||
#. module: backend_debranding_v11
|
||||
#: code:addons/backend_debranding_v11/models/mail_template.py:25
|
||||
#, python-format
|
||||
msgid "Odoo"
|
||||
msgstr ""
|
||||
|
||||
#. module: backend_debranding_v11
|
||||
#: code:addons/backend_debranding_v11/models/mail_template.py:24
|
||||
#, python-format
|
||||
msgid "using"
|
||||
msgstr ""
|
|
@ -1,34 +0,0 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * backend_debranding_v11
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-05-15 14:50+0000\n"
|
||||
"PO-Revision-Date: 2017-05-15 14:50+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: backend_debranding_v11
|
||||
#: model:ir.model,name:backend_debranding_v11.model_mail_template
|
||||
msgid "Email Templates"
|
||||
msgstr "Plantillas de correo electrónico"
|
||||
|
||||
#. module: backend_debranding_v11
|
||||
#: code:addons/backend_debranding_v11/models/mail_template.py:25
|
||||
#, python-format
|
||||
msgid "Odoo"
|
||||
msgstr "Odoo"
|
||||
|
||||
#. module: backend_debranding_v11
|
||||
#: code:addons/backend_debranding_v11/models/mail_template.py:24
|
||||
#, python-format
|
||||
msgid "using"
|
||||
msgstr "usando"
|
|
@ -1,37 +0,0 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * backend_debranding_v12
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2018
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-01-24 03:51+0000\n"
|
||||
"PO-Revision-Date: 2018-01-24 03:51+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2018\n"
|
||||
"Language-Team: Spanish (Mexico) (https://www.transifex.com/oca/teams/23907/"
|
||||
"es_MX/)\n"
|
||||
"Language: es_MX\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: backend_debranding_v11
|
||||
#: model:ir.model,name:backend_debranding_v11.model_mail_template
|
||||
msgid "Email Templates"
|
||||
msgstr "Plantillas de Correo Electrónico"
|
||||
|
||||
#. module: backend_debranding_v11
|
||||
#: code:addons/backend_debranding_v11/models/mail_template.py:25
|
||||
#, python-format
|
||||
msgid "Odoo"
|
||||
msgstr ""
|
||||
|
||||
#. module: backend_debranding_v11
|
||||
#: code:addons/backend_debranding_v11/models/mail_template.py:24
|
||||
#, python-format
|
||||
msgid "using"
|
||||
msgstr ""
|
|
@ -1,36 +0,0 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * backend_debranding_v11
|
||||
#
|
||||
# Translators:
|
||||
# Quentin THEURET <odoo@kerpeo.com>, 2018
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-02-26 01:46+0000\n"
|
||||
"PO-Revision-Date: 2018-02-26 01:46+0000\n"
|
||||
"Last-Translator: Quentin THEURET <odoo@kerpeo.com>, 2018\n"
|
||||
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#. module: backend_debranding_v11
|
||||
#: model:ir.model,name:backend_debranding_v11.model_mail_template
|
||||
msgid "Email Templates"
|
||||
msgstr "Modèles de courriel"
|
||||
|
||||
#. module: backend_debranding_v11
|
||||
#: code:addons/backend_debranding_v11/models/mail_template.py:25
|
||||
#, python-format
|
||||
msgid "Odoo"
|
||||
msgstr "Odoo"
|
||||
|
||||
#. module: backend_debranding_v11
|
||||
#: code:addons/backend_debranding_v11/models/mail_template.py:24
|
||||
#, python-format
|
||||
msgid "using"
|
||||
msgstr "utilisant"
|
|
@ -1,37 +0,0 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * backend_debranding_v11
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2018
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-01-24 03:51+0000\n"
|
||||
"PO-Revision-Date: 2018-01-24 03:51+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2018\n"
|
||||
"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
|
||||
"Language: hr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
||||
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
|
||||
|
||||
#. module: backend_debranding_v11
|
||||
#: model:ir.model,name:backend_debranding_v11.model_mail_template
|
||||
msgid "Email Templates"
|
||||
msgstr "Predlošci mailova"
|
||||
|
||||
#. module: backend_debranding_v11
|
||||
#: code:addons/backend_debranding_v11/models/mail_template.py:25
|
||||
#, python-format
|
||||
msgid "Odoo"
|
||||
msgstr ""
|
||||
|
||||
#. module: backend_debranding_v11
|
||||
#: code:addons/backend_debranding_v11/models/mail_template.py:24
|
||||
#, python-format
|
||||
msgid "using"
|
||||
msgstr ""
|
|
@ -1,36 +0,0 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * backend_debranding_v11
|
||||
#
|
||||
# Translators:
|
||||
# Marius Marolla <mariusmarolla@entersys.it>, 2018
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-01-24 03:51+0000\n"
|
||||
"PO-Revision-Date: 2018-01-24 03:51+0000\n"
|
||||
"Last-Translator: Marius Marolla <mariusmarolla@entersys.it>, 2018\n"
|
||||
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n"
|
||||
"Language: it\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: backend_debranding_v11
|
||||
#: model:ir.model,name:backend_debranding_v11.model_mail_template
|
||||
msgid "Email Templates"
|
||||
msgstr "Modelli Email"
|
||||
|
||||
#. module: backend_debranding_v11
|
||||
#: code:addons/backend_debranding_v11/models/mail_template.py:25
|
||||
#, python-format
|
||||
msgid "Odoo"
|
||||
msgstr ""
|
||||
|
||||
#. module: backend_debranding_v11
|
||||
#: code:addons/backend_debranding_v11/models/mail_template.py:24
|
||||
#, python-format
|
||||
msgid "using"
|
||||
msgstr ""
|
|
@ -1,32 +0,0 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * backend_debranding_v12
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 11.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: backend_debranding_v12
|
||||
#: model:ir.model,name:backend_debranding_v11.model_mail_template
|
||||
msgid "Email Templates"
|
||||
msgstr ""
|
||||
|
||||
#. module: backend_debranding_v11
|
||||
#: code:addons/backend_debranding_v12/models/mail_template.py:25
|
||||
#, python-format
|
||||
msgid "Odoo"
|
||||
msgstr ""
|
||||
|
||||
#. module: backend_debranding_v12
|
||||
#: code:addons/backend_debranding_v12/models/mail_template.py:24
|
||||
#, python-format
|
||||
msgid "using"
|
||||
msgstr ""
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * backend_debranding_v12
|
||||
#
|
||||
# Translators:
|
||||
# Peter Hageman <hageman.p@gmail.com>, 2018
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-01-24 03:51+0000\n"
|
||||
"PO-Revision-Date: 2018-01-24 03:51+0000\n"
|
||||
"Last-Translator: Peter Hageman <hageman.p@gmail.com>, 2018\n"
|
||||
"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/"
|
||||
"teams/23907/nl_NL/)\n"
|
||||
"Language: nl_NL\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: backend_debranding_v12
|
||||
#: model:ir.model,name:backend_debranding_v12.model_mail_template
|
||||
msgid "Email Templates"
|
||||
msgstr "E-mailsjablonen"
|
||||
|
||||
#. module: backend_debranding_v12
|
||||
#: code:addons/backend_debranding_v12/models/mail_template.py:25
|
||||
#, python-format
|
||||
msgid "Odoo"
|
||||
msgstr ""
|
||||
|
||||
#. module: backend_debranding_v12
|
||||
#: code:addons/backend_debranding_v12/models/mail_template.py:24
|
||||
#, python-format
|
||||
msgid "using"
|
||||
msgstr ""
|
|
@ -1,37 +0,0 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * backend_debranding_v12
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2018
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-01-24 03:51+0000\n"
|
||||
"PO-Revision-Date: 2018-01-24 03:51+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2018\n"
|
||||
"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/"
|
||||
"zh_CN/)\n"
|
||||
"Language: zh_CN\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
|
||||
#. module: backend_debranding_v12
|
||||
#: model:ir.model,name:backend_debranding_v12.model_mail_template
|
||||
msgid "Email Templates"
|
||||
msgstr "Email 模板"
|
||||
|
||||
#. module: backend_debranding_v12
|
||||
#: code:addons/backend_debranding_v12/models/mail_template.py:25
|
||||
#, python-format
|
||||
msgid "Odoo"
|
||||
msgstr ""
|
||||
|
||||
#. module: backend_debranding_v12
|
||||
#: code:addons/backend_debranding_v12/models/mail_template.py:24
|
||||
#, python-format
|
||||
msgid "using"
|
||||
msgstr ""
|
|
@ -1,10 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import ir_actions
|
||||
from . import ir_translation
|
||||
from . import ir_config_parameter
|
||||
# from . import web_planner
|
||||
from . import ir_ui_view
|
||||
from . import fields
|
||||
from . import mail_template
|
||||
from . import res_users
|
|
@ -1,5 +0,0 @@
|
|||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo.fields import _String
|
||||
|
||||
get_trans_func = _String.get_trans_func
|
||||
|
||||
|
||||
def get_trans_func_debrand(self, records):
|
||||
# check either backend_debranding is installed
|
||||
if not hasattr(records.env['ir.translation'], '_debrand'):
|
||||
return get_trans_func(self, records)
|
||||
|
||||
if True: # keep original indent
|
||||
if callable(self.translate):
|
||||
rec_src_trans = records.env['ir.translation']._get_terms_translations(self, records)
|
||||
|
||||
def translate(record_id, value):
|
||||
src_trans = rec_src_trans[record_id]
|
||||
|
||||
def tr(source):
|
||||
trans = src_trans.get(source, source)
|
||||
return records.env['ir.translation']._debrand(trans)
|
||||
return self.translate(tr, value)
|
||||
|
||||
else:
|
||||
rec_trans = records.env['ir.translation']._get_ids(
|
||||
'%s,%s' % (self.model_name, self.name), 'model', records.env.lang, records.ids)
|
||||
|
||||
def translate(record_id, value):
|
||||
return rec_trans.get(record_id) or value
|
||||
|
||||
return translate
|
||||
|
||||
_String.get_trans_func = get_trans_func_debrand
|
|
@ -1,23 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import api, models
|
||||
from odoo.tools.translate import _
|
||||
|
||||
|
||||
class ir_actions_act_window_debranding(models.Model):
|
||||
_inherit = 'ir.actions.act_window'
|
||||
|
||||
def read(self, fields=None, load='_classic_read'):
|
||||
""" call the method get_empty_list_help of the model and set the window action help message
|
||||
"""
|
||||
result = super(ir_actions_act_window_debranding, self).read(fields, load=load)
|
||||
if not fields or 'help' in fields:
|
||||
new_name = self.env['ir.config_parameter'].get_param('backend_debranding_v12.new_name')
|
||||
new_name = new_name and new_name.strip() or _('Software')
|
||||
for values in result:
|
||||
model = values.get('res_model')
|
||||
if model in self.env:
|
||||
values['help'] = self.env[model].get_empty_list_help(values.get('help', ""))
|
||||
if values['help']:
|
||||
values['help'] = values['help'].replace('Odoo', new_name)
|
||||
return result
|
|
@ -1,32 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, api, tools
|
||||
|
||||
PARAMS = [
|
||||
'backend_debranding_v12.new_name',
|
||||
'backend_debranding_v12.new_title',
|
||||
'backend_debranding_v12.favicon_url',
|
||||
'backend_debranding_v12.planner_footer',
|
||||
'backend_debranding_v12.default_logo_module'
|
||||
]
|
||||
|
||||
|
||||
class IrConfigParameter(models.Model):
|
||||
_inherit = 'ir.config_parameter'
|
||||
|
||||
@api.model
|
||||
@tools.ormcache()
|
||||
def get_debranding_parameters(self):
|
||||
res = {}
|
||||
for param in PARAMS:
|
||||
value = self.env['ir.config_parameter'].get_param(param)
|
||||
res[param] = value
|
||||
return res
|
||||
|
||||
def write(self, vals, context=None):
|
||||
res = super(IrConfigParameter, self).write(vals)
|
||||
for r in self:
|
||||
if r.key in PARAMS:
|
||||
self.get_debranding_parameters.clear_cache(self)
|
||||
break
|
||||
return res
|
|
@ -1,43 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from odoo import api, models, tools
|
||||
|
||||
|
||||
class ir_translation(models.Model):
|
||||
_inherit = 'ir.translation'
|
||||
|
||||
def _debrand_dict(self, res):
|
||||
for k in res:
|
||||
res[k] = self._debrand(res[k])
|
||||
return res
|
||||
|
||||
def _debrand(self, source):
|
||||
if not source or not re.search(r'\bodoo\b', source, re.IGNORECASE):
|
||||
return source
|
||||
|
||||
new_name = self.env['ir.config_parameter'].sudo().get_param('backend_debranding_v12.new_name')
|
||||
|
||||
if not new_name:
|
||||
return source
|
||||
substitute=re.sub(r'\bodoo\b', new_name, source, flags=re.IGNORECASE)
|
||||
return substitute
|
||||
# return source
|
||||
|
||||
@tools.ormcache('name', 'types', 'lang', 'source', 'res_id')
|
||||
def __get_source(self, name, types, lang, source, res_id):
|
||||
res = super(ir_translation, self).__get_source(name, types, lang, source, res_id)
|
||||
return self._debrand(res)
|
||||
|
||||
@api.model
|
||||
@tools.ormcache_context('model_name', keys=('lang',))
|
||||
def get_field_string(self, model_name):
|
||||
res = super(ir_translation, self).get_field_string(model_name)
|
||||
return self._debrand_dict(res)
|
||||
|
||||
@api.model
|
||||
@tools.ormcache_context('model_name', keys=('lang',))
|
||||
def get_field_help(self, model_name):
|
||||
res = super(ir_translation, self).get_field_help(model_name)
|
||||
return self._debrand_dict(res)
|
|
@ -1,45 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import SUPERUSER_ID, models
|
||||
|
||||
MODULE = '_backend_debranding_v12'
|
||||
|
||||
|
||||
class view(models.Model):
|
||||
_inherit = 'ir.ui.view'
|
||||
|
||||
def _create_debranding_views(self):
|
||||
|
||||
self._create_view('menu_secondary', 'web.menu_secondary', '''
|
||||
<xpath expr="//div[@class='oe_footer']" position="replace">
|
||||
<div class="oe_footer"></div>
|
||||
</xpath>''')
|
||||
|
||||
def _create_view(self, name, inherit_id, arch, noupdate=False, type='qweb'):
|
||||
registry = self.pool
|
||||
view_id = registry['ir.model.data'].xmlid_to_res_id(SUPERUSER_ID, "%s.%s" % (MODULE, name))
|
||||
if view_id:
|
||||
registry['ir.ui.view'].write(SUPERUSER_ID, [view_id], {
|
||||
'arch': arch,
|
||||
})
|
||||
return view_id
|
||||
|
||||
try:
|
||||
view_id = registry['ir.ui.view'].create(SUPERUSER_ID, {
|
||||
'name': name,
|
||||
'type': type,
|
||||
'arch': arch,
|
||||
'inherit_id': registry['ir.model.data'].xmlid_to_res_id(SUPERUSER_ID, inherit_id, raise_if_not_found=True)
|
||||
})
|
||||
except:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
return
|
||||
registry['ir.model.data'].create(SUPERUSER_ID, {
|
||||
'name': name,
|
||||
'model': 'ir.ui.view',
|
||||
'module': MODULE,
|
||||
'res_id': view_id,
|
||||
'noupdate': noupdate,
|
||||
})
|
||||
return view_id
|
|
@ -1,40 +0,0 @@
|
|||
# Copyright 2018 Planet Odoo
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
# This is used for replacing odoo to Planet Odoo in emails
|
||||
|
||||
import re
|
||||
from odoo import _, api, models
|
||||
|
||||
|
||||
class MailTemplate(models.Model):
|
||||
_inherit = 'mail.template'
|
||||
|
||||
def generate_email(self, res_ids, fields=None):
|
||||
obj = self.with_context(mail_debrand=True)
|
||||
return super(MailTemplate, obj).generate_email(res_ids, fields=fields)
|
||||
|
||||
@api.model
|
||||
def _debrand_body(self, body):
|
||||
using_word = _('using')
|
||||
# print(body)
|
||||
body=re.sub(
|
||||
_('Odoo') , "Planet Odoo", body,
|
||||
)
|
||||
return re.sub(
|
||||
'https://www.odoo.com','http://www.planet-odoo.com/', body,
|
||||
)
|
||||
|
||||
@api.model
|
||||
def render_template(self, template_txt, model, res_ids,
|
||||
post_process=False):
|
||||
res = super(MailTemplate, self).render_template(
|
||||
template_txt, model, res_ids, post_process=post_process,
|
||||
)
|
||||
if self.env.context.get('mail_debrand'):
|
||||
if isinstance(res, str):
|
||||
res = self._debrand_body(res)
|
||||
else:
|
||||
for res_id, body in res.items():
|
||||
res[res_id] = self._debrand_body(body)
|
||||
return res
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import _, api, exceptions, fields, models, modules
|
||||
from odoo.tools import pycompat
|
||||
|
||||
|
||||
class Users(models.Model):
|
||||
""" Update of res.users class
|
||||
- add a preference about sending emails about notifications
|
||||
- make a new user follow itself
|
||||
- add a welcome message
|
||||
- add suggestion preference
|
||||
- if adding groups to an user, check mail.channels linked to this user
|
||||
group, and the user. This is done by overriding the write method.
|
||||
"""
|
||||
_inherit = 'res.users'
|
||||
|
||||
notification_type = fields.Selection([
|
||||
('email', 'Handle by Emails'),
|
||||
('inbox', 'Handle in Planet Odoo')],
|
||||
'Notification Management', required=True, default='email',
|
||||
help="Policy on how to handle Chatter notifications:\n"
|
||||
"- Emails: notifications are sent to your email\n"
|
||||
"- Planet Odoo: notifications appear in your Planet Odoo Inbox")
|
|
@ -1,20 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import api, models
|
||||
import re
|
||||
|
||||
|
||||
class Planner(models.Model):
|
||||
_inherit = 'web.planner'
|
||||
|
||||
@api.model
|
||||
def render(self, template_id, planner_app):
|
||||
res = super(Planner, self).render(template_id, planner_app)
|
||||
new_company = self.env['ir.config_parameter'].get_debranding_parameters().get('backend_debranding_v12.new_name')
|
||||
planner_footer = self.env['ir.config_parameter'].get_debranding_parameters().get('backend_debranding_v12.planner_footer')
|
||||
planner_footer = '<p>' + str(planner_footer) + '/p'
|
||||
res = re.sub(r'<p>[^<]*to contact our accounting experts by using the[\s\S]*?</div>', '', res)
|
||||
res = re.sub(r'<h4>Don\'t hesitate to[\s\S]*logo.png"/>', '', res)
|
||||
res = re.sub(r'<p>Once it\'s fully working[\s\S]*odoo_logo.png"/>', planner_footer, res)
|
||||
res = re.sub(r'[Oo]doo', str(new_company), res)
|
||||
return res
|
|
@ -1,7 +0,0 @@
|
|||
-
|
||||
!python {model: ir.translation}: |
|
||||
self.clear_caches()
|
||||
|
||||
# -
|
||||
# !python {model: ir.ui.view}: |
|
||||
# self._create_debranding_views(cr, uid)
|
|
@ -1,2 +0,0 @@
|
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_ir_config_parameter_group_user,ir.config.parameter.group.user,base.model_ir_config_parameter,base.group_user,1,1,1,1
|
|
Before Width: | Height: | Size: 107 KiB |
|
@ -1,5 +0,0 @@
|
|||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
Before Width: | Height: | Size: 105 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 56 KiB |
|
@ -1,70 +0,0 @@
|
|||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="oe_span12">
|
||||
<h2 class="oe_slogan" style="text-align: center;font-size: 28px;font-weight: 600;margin: 0px !important;">Debranding Kit</h2>
|
||||
|
||||
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
|
||||
Overview
|
||||
</h2>
|
||||
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
|
||||
Want to debrand your company website? Debranding Kit module developed by Planet Odoo
|
||||
helps you to change the aesthetic look of Odoo software via customizing them
|
||||
with logo and other branding changes. The module helps you to change almost every area of Odoo visuals,
|
||||
delivering a brand new customized website.
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="mb16">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<p class="oe_slogan" style="text-align: left;font-weight: 600;margin: 0px !important;">
|
||||
<p><h4>
|
||||
Below Remove in Odoo:<br/></h4></p>
|
||||
</div>
|
||||
<div class="oe_slogan" style="text-align: left;margin: 0px !important;">
|
||||
1. Deletes Odoo label in footer<br />
|
||||
2. Replaces "Odoo" in page title<br />
|
||||
3.Deletes Apps and other blocks from Settings/Dashboard.<br />
|
||||
4.Odoo accounts and documentation is removed from the dropdown list.<br />
|
||||
5.Deletes Apps and other blocks from Settings/Dashboard<br />
|
||||
6.Update Odoo titles on Error Dialogues<br />
|
||||
7.Replaces "Odoo" in Dialog Box<br />
|
||||
8.Deletes "Odoo" in a request message for permission desktop notifications<br />
|
||||
9. Replaces "Odoo" in help message for empty list<br />
|
||||
10.Replaces default favicon to custom fevicon<br />
|
||||
</div>
|
||||
|
||||
<img src="website_change.png" height="400" width="800"><br /> <br />
|
||||
<img src="setting_logo.png" height="400" width="800"><br /> <br />
|
||||
<img src="website_custom.png" height="400" width="800"><br /> <br />
|
||||
<img src="dashboard_drop.png" height="400" width="800"><br /> <br />
|
||||
<img src="dialogbox_rename.png" height="400" width="800"><br /> <br />
|
||||
<img src="error.png" height="400" width="800"><br /> <br />
|
||||
<img src="discuss.png" height="400" width="800"><br /> <br />
|
||||
<div>
|
||||
<h2>By default the module replaces "Odoo" to "Your Company/Tag". <br /></h2>
|
||||
<h4>To configure module open Settings\\System Parameters and modify<br /></h4>
|
||||
- backend_debranding_v12.new_title (put space in value if you don't need Brand in Title)<br />
|
||||
- backend_debranding_v12.new_name (your Brand)<br />
|
||||
- backend_debranding_v12.favicon_url<br />
|
||||
- backend_debranding_v12.planner_footer<br />
|
||||
</div>
|
||||
<div>
|
||||
<img src="system_parameter.png" height="400" width="800">
|
||||
</section>
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced text-center">
|
||||
<div class="oe_span12">
|
||||
<h2 class="oe_slogan">Help & Support</h2>
|
||||
</div>
|
||||
<div class="oe_span12">
|
||||
<p>Odoo support services is available to help you.</p>
|
||||
<div class="text-center">
|
||||
<a style="color: #FFF; background-color: #E84C3D; border: 1px solid #E84C3D;" class="btn btn-success btn-lg" rel="nofollow" href="http://www.planet-odoo.com/#contact" target="_blank">
|
||||
<i class="fa fa-envelope"></i> Contact Us
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 111 KiB |
Before Width: | Height: | Size: 123 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 137 KiB |
|
@ -1,5 +0,0 @@
|
|||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
|
||||
a:hover, a:focus {
|
||||
color: #FFFFFF;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#oe_main_menu_navbar .oe_topbar_avatar {
|
||||
max-height: 18px;
|
||||
width: 18px;
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
.o_sub_menu{
|
||||
background-color: #9ACD32;
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
/* for main menu*/
|
||||
.o_web_client > .o_main .o_sub_menu .o_sub_menu_content .oe_secondary_menu_section{
|
||||
color: #000000;
|
||||
}
|
||||
/* submenu*/
|
||||
|
||||
.o_web_client > .o_main .o_sub_menu .o_sub_menu_content .oe_secondary_submenu > li:not(.active) > a{
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
a{
|
||||
color:#000000;
|
||||
}
|
||||
|
||||
.nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus {
|
||||
background-color:#000000;
|
||||
}
|
||||
|
||||
body{
|
||||
color:#000000;
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
#oe_main_menu_navbar {
|
||||
background-color: #cc66ff;
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
/*.navbar-inverse .navbar-text {
|
||||
color: #660000;
|
||||
}*/
|
||||
.navbar-inverse .navbar-nav > li > a {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.openerp .oe_secondary_menu_section {
|
||||
color:#cc66ff;
|
||||
}
|
||||
|
||||
/*.openerp .oe_secondary_submenu .oe_menu_text {
|
||||
color:#ffffff;
|
||||
}*/
|
||||
|
||||
|
||||
.openerp .nav-pills > li.active > a, .openerp a.list-group-item.active > a{
|
||||
background-color: #cc66ff;
|
||||
}
|
||||
|
||||
.openerp .oe_application a {
|
||||
color:#cc66ff;
|
||||
}
|
||||
|
||||
|
||||
.openerp .nav-pills > li.active a:hover, .openerp .nav-pills > li.active a:focus,
|
||||
.openerp a.list-group-item.active a:hover, .openerp a.list-group-item.active a:focus{
|
||||
background-color: #cc66ff;
|
||||
}
|
||||
|
||||
.openerp .badge {
|
||||
background-color: #cc66ff;
|
||||
}
|
||||
|
||||
.openerp .oe_view_manager table.oe_view_manager_header h2 a{
|
||||
color: #cc66ff;
|
||||
}
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
.o_application_switcher .o_application_switcher_footer{
|
||||
display: none;
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
Before Width: | Height: | Size: 23 KiB |
|
@ -1,5 +0,0 @@
|
|||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 56 KiB |
|
@ -1,9 +0,0 @@
|
|||
odoo.define('backend_debranding_v12.announcement', function(require) {
|
||||
"use strict";
|
||||
|
||||
// require('mail.announcement');
|
||||
var WebClient = require('web.WebClient');
|
||||
WebClient.include({
|
||||
show_annoucement_bar: function() {}
|
||||
});
|
||||
});
|
|
@ -1,13 +0,0 @@
|
|||
odoo.define('backend_debranding_v12.dashboard', function (require) {
|
||||
"use strict";
|
||||
|
||||
var dashboard = require('web_settings_dashboard');
|
||||
dashboard.Dashboard.include({
|
||||
start: function(){
|
||||
this.all_dashboards = _.without(this.all_dashboards, 'planner', 'apps');
|
||||
this.$('.o_web_settings_dashboard_apps').parent().remove();
|
||||
this.$('.o_web_settings_dashboard_planner').parent().remove();
|
||||
return this._super();
|
||||
},
|
||||
});
|
||||
});
|
|
@ -1,5 +0,0 @@
|
|||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
odoo.define('backend_debranding.dialog', function(require) {
|
||||
var core = require('web.core');
|
||||
var QWeb = core.qweb;
|
||||
var _t = core._t;
|
||||
var rpc = require('web.rpc');
|
||||
// var Model = require('web.DataModel')
|
||||
// var debranding_new_name = 'Ctotal';
|
||||
var debranding_new_name = 'Planet Odoo';
|
||||
// var model = new Model("ir.config_parameter");
|
||||
var r = rpc.query({
|
||||
model: 'ir.config_parameter',
|
||||
method: 'search_read',
|
||||
args: [[['key', '=', 'backend_debranding.new_name']],['value']],
|
||||
limit: 1,
|
||||
}).then(function (data) {
|
||||
if (!data.length)
|
||||
return;
|
||||
debranding_new_name = data[0].value;
|
||||
});
|
||||
|
||||
var CrashManager = require('web.CrashManager')
|
||||
CrashManager.include({
|
||||
init: function () {
|
||||
this._super();
|
||||
var self = this;
|
||||
// var model = new Model("ir.config_parameter");
|
||||
self.debranding_new_name = _t('Software');
|
||||
if (!openerp.session.db)
|
||||
return;
|
||||
// var r = model.query(['value'])
|
||||
// .filter([['key', '=', 'backend_debranding.new_name']])
|
||||
// .limit(1)
|
||||
// .all().then(function (data) {
|
||||
// if (!data.length)
|
||||
// return;
|
||||
// self.debranding_new_name = data[0].value;
|
||||
// });
|
||||
var r = rpc.query({
|
||||
model: 'ir.config_parameter',
|
||||
method: 'search_read',
|
||||
args: [[['key', '=', 'backend_debranding.new_name']],['value']],
|
||||
limit: 1,
|
||||
}).then(function (data) {
|
||||
if (!data.length)
|
||||
return;
|
||||
self.debranding_new_name = data[0].value;
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
var Dialog = require('web.Dialog')
|
||||
Dialog.include({
|
||||
init: function (parent, options) {
|
||||
|
||||
// TODO find another way to get debranding_new_name
|
||||
if (parent && parent.debranding_new_name){
|
||||
debranding_new_name = parent.debranding_new_name;
|
||||
}
|
||||
options = options || {};
|
||||
if (options['title']){
|
||||
var title = options['title'].replace(/Odoo/ig, debranding_new_name);
|
||||
options['title'] = title;
|
||||
} else {
|
||||
options['title'] = debranding_new_name;
|
||||
}
|
||||
if (options.$content){
|
||||
if (!(options.$content instanceof $)){
|
||||
options.$content = $(options.$content)
|
||||
}
|
||||
var content_html = options.$content.html().replace(/Odoo/ig, debranding_new_name);
|
||||
options.$content.html(content_html);
|
||||
}
|
||||
this._super(parent, options);
|
||||
},
|
||||
});
|
||||
});
|
|
@ -1,33 +0,0 @@
|
|||
odoo.define('backend_debranding_v12.field_upgrade', function(require) {
|
||||
"use strict";
|
||||
|
||||
var core = require('web.core');
|
||||
var UpgradeBoolean = core.form_widget_registry.get('upgrade_boolean');
|
||||
var UpgradeRadio = core.form_widget_registry.get('upgrade_radio');
|
||||
|
||||
var include = {
|
||||
'start': function() {
|
||||
var $el = this.$el;
|
||||
var i = 1;
|
||||
var MAX = 10;
|
||||
while (true) {
|
||||
if (i > MAX)
|
||||
break;
|
||||
i++;
|
||||
if ($el.prop("tagName") == 'TR') {
|
||||
$el.hide();
|
||||
break;
|
||||
}
|
||||
$el = $el.parent();
|
||||
if (!$el)
|
||||
break;
|
||||
}
|
||||
},
|
||||
'on_click_input': function() {}
|
||||
};
|
||||
|
||||
//skip this for a while as we don't have example to test it
|
||||
//UpgradeRadio.include(include);
|
||||
|
||||
UpgradeBoolean.include(include);
|
||||
});
|
|
@ -1,64 +0,0 @@
|
|||
odoo.define('backend_debranding.title', function(require) {
|
||||
"use strict";
|
||||
var core = require('web.core');
|
||||
var QWeb = core.qweb;
|
||||
var _t = core._t;
|
||||
var WebClient = require('web.WebClient');
|
||||
var rpc = require('web.rpc');
|
||||
// var Model = require('web.DataModel');
|
||||
// var model = new Model("ir.config_parameter");
|
||||
var title_part
|
||||
// var r = model.query(['value'])
|
||||
// .filter([['key', '=', 'backend_debranding.new_title']])
|
||||
// .limit(1)
|
||||
// .all().then(function (data) {
|
||||
// if (!data.length)
|
||||
// return;
|
||||
// title_part = data[0].value;
|
||||
// title_part = title_part.trim();
|
||||
// });
|
||||
var r = rpc.query({
|
||||
model: 'ir.config_parameter',
|
||||
method: 'search_read',
|
||||
args: [[['key', '=', 'backend_debranding.new_title']],['value']],
|
||||
limit: 1,
|
||||
}).then(function (data) {
|
||||
if (!data.length)
|
||||
return;
|
||||
title_part = data[0].value;
|
||||
title_part = title_part.trim();
|
||||
});
|
||||
WebClient.include({
|
||||
init: function(parent, client_options) {
|
||||
this._super(parent, client_options);
|
||||
|
||||
this.set('title_part', {"zopenerp": title_part});
|
||||
// this.get_title_part();
|
||||
},
|
||||
get_title_part: function(){
|
||||
if (!openerp.session.db)
|
||||
return;
|
||||
var self = this;
|
||||
// var model = new Model("ir.config_parameter");
|
||||
|
||||
// var r = model.query(['value'])
|
||||
// .filter([['key', '=', 'backend_debranding.new_title']])
|
||||
// .limit(1)
|
||||
// .all().then(function (data) {
|
||||
// if (!data.length)
|
||||
// return;
|
||||
var r = rpc.query({
|
||||
model: 'ir.config_parameter',
|
||||
method: 'search_read',
|
||||
args: [[['key', '=', 'backend_debranding.new_title']],['value']],
|
||||
limit: 1,
|
||||
}).then(function (data) {
|
||||
if (!data.length)
|
||||
return;
|
||||
title_part = data[0].value;
|
||||
title_part = title_part.trim();
|
||||
self.set('title_part', {"zopenerp": title_part});
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
|
@ -1,5 +0,0 @@
|
|||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
@odoo-font-size-base: 13px;
|
||||
|
||||
// Colors
|
||||
@odoo-brand-primary: #9ACD32;
|
||||
@odoo-brand-optional: #9ACD32;
|
||||
@odoo-brand-secondary: #f0eeee;
|
||||
@odoo-brand-lightsecondary: #e2e2e0;
|
||||
|
||||
@odoo-color-pink: #a24689;
|
||||
@odoo-main-color-muted: #a8a8a8;
|
||||
@odoo-main-text-color: #4c4c4c;
|
||||
|
||||
@odoo-view-background-color: white;
|
||||
@odoo-shadow-color: #303030;
|
||||
|
||||
@odoo-webclient-background-color: @odoo-brand-secondary;
|
||||
@odoo-control-panel-background-color: @odoo-webclient-background-color;
|
||||
@odoo-form-lightsecondary: #ccc;
|
||||
@odoo-list-grey: @odoo-brand-lightsecondary;
|
||||
|
||||
@odoo-list-footer-color: @odoo-main-text-color;
|
||||
@odoo-list-footer-bg-color: #eee;
|
||||
@odoo-list-footer-font-weight: bold;
|
||||
|
||||
@odoo-tooltip-background-color: black;
|
||||
@odoo-tooltip-color: white;
|
||||
@odoo-tooltip-arrow-color: black;
|
||||
|
||||
// Layout
|
||||
@screen-xs-min: 475px;
|
||||
@screen-xxs-max: (@screen-xs-min - 1);
|
||||
|
||||
@odoo-form-group-cols: 12;
|
||||
@odoo-form-spacing-unit: 5px;
|
||||
@odoo-horizontal-padding: 16px;
|
||||
@odoo-innergroup-rpadding: 45px;
|
||||
@odoo-dropdown-hpadding: 25px;
|
||||
|
||||
@border-radius-base: 3px;
|
||||
|
||||
@odoo-sheet-vpadding: 24px;
|
||||
|
||||
@odoo-avatar-size: 90px;
|
||||
|
||||
@odoo-statusbar-height: 36px;
|
||||
@odoo-statusbar-arrow-width: @odoo-statusbar-height/3;
|
||||
|
||||
@odoo-label-font-size-factor: 0.8;
|
||||
@odoo-navbar-height: 34px;
|
||||
@odoo-navbar-inverse-link-hover-bg: darken(@odoo-brand-primary, 10%);
|
|
@ -1,33 +0,0 @@
|
|||
<template>
|
||||
<t t-extend="DashboardShare">
|
||||
<t t-jquery="div.o_web_settings_dashboard_share" t-operation="replace">
|
||||
<div class="text-center o_web_settings_dashboard_share">
|
||||
<i class="fa fa-share-alt fa-4x text-muted"/>
|
||||
<div class="o_web_settings_dashboard_header">Share the Love</div>
|
||||
<div>
|
||||
<small class="text-muted text-center o_web_settings_dashboard_compact_subtitle">
|
||||
Help us spread the word: Share Planet Odoo's awesomeness with your friends!
|
||||
|
||||
</small>
|
||||
</div>
|
||||
<div class="row mt16">
|
||||
<!--<div class="col-xs-4"><a><i class="fa fa-twitter-square fa-4x tw_share"/></a></div>-->
|
||||
<!--<div class="col-xs-4"><a><i class="fa fa-facebook-square fa-4x fb_share"/></a></div>-->
|
||||
<!--<div class="col-xs-4"><a><i class="fa fa-linkedin-square fa-4x li_share"/></a></div>-->
|
||||
</div>
|
||||
<hr/>
|
||||
<t t-set="server_version" t-value="widget.data.server_version"/>
|
||||
<t t-set="debug" t-value="widget.data.debug"/>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<a t-if="debug != true" class="oe_activate_debug_mode pull-right" href="?debug" >Activate the developer mode</a>
|
||||
<br t-if="debug != true"/>
|
||||
<a t-if="debug != 'assets'" class="oe_activate_debug_mode pull-right" href="?debug=assets" >Activate the developer mode (with assets)</a>
|
||||
<br t-if="debug != 'assets'"/>
|
||||
<a t-if="debug != false" class="oe_activate_debug_mode pull-right" href="/web" >Deactivate the developer mode</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
|
@ -1,5 +0,0 @@
|
|||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates>
|
||||
<t t-extend="mail.client_action">
|
||||
<t t-jquery=".o_mail_request_permission" t-operation="inner">
|
||||
Your permission is required to <a href="#"> enable desktop notifications</a>.
|
||||
</t>
|
||||
</t>
|
||||
<t t-extend="UserMenu.Actions">
|
||||
<t t-jquery="a[data-menu='documentation']" t-operation="replace">
|
||||
|
||||
</t>
|
||||
<t t-jquery="a[data-menu='support']" t-operation="replace">
|
||||
|
||||
</t>
|
||||
<!-- <t t-jquery="a[data-menu='about']" t-operation="replace"></t> -->
|
||||
<t t-jquery="a[data-menu='account']" t-operation="replace">
|
||||
|
||||
</t>
|
||||
<t t-jquery="li.divider" t-operation="replace">
|
||||
|
||||
</t>
|
||||
</t>
|
||||
</templates>
|
|
@ -1,27 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<odoo>
|
||||
<data>
|
||||
<!--<template id="change_menu_color_branding_css_replace" name="change_menu_color assets" inherit_id="web.assets_common">-->
|
||||
<!--<xpath expr="." position="inside">-->
|
||||
<!--<link rel="stylesheet" href="/backend_debranding_v11/static/src/css/menu.css"/>-->
|
||||
<!--</xpath>-->
|
||||
<!--</template>-->
|
||||
<!--<template id="change_menu_color_css_branding_replace_text" name="change_menu_color assets" inherit_id="web.assets_backend">-->
|
||||
<!--<xpath expr="." position="inside">-->
|
||||
<!--<link rel="stylesheet" href="/backend_debranding_v11/static/src/css/menu_text.css"/>-->
|
||||
<!--</xpath>-->
|
||||
<!--</template>-->
|
||||
|
||||
<template id="change_menu_left_color_css_branding_replace" name="change_menu_color assets" inherit_id="web.assets_common">
|
||||
<xpath expr="." position="inside">
|
||||
<link rel="stylesheet" href="/backend_debranding_v12/static/src/css/left_menu.css"/>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="change_menu_left_color_css_branding_replace_text" name="change_menu_color assets" inherit_id="web.assets_backend">
|
||||
<xpath expr="." position="inside">
|
||||
<link rel="stylesheet" href="/backend_debranding_v12/static/src/css/left_menu_text.css"/>
|
||||
</xpath>
|
||||
</template>
|
||||
</data>
|
||||
</odoo>
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="default_logo_module" model="ir.config_parameter">
|
||||
<field name="key">backend_debranding_v12.default_logo_module</field>
|
||||
<field name="value">backend_debranding_v12</field>
|
||||
</record>
|
||||
<record id="base.main_partner" model="res.partner">
|
||||
<field name="image"></field>
|
||||
</record>
|
||||
</odoo>
|
|
@ -1,351 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Planet Odoo</title>
|
||||
<link rel="shortcut icon" href="/web/static/src/img/favicon.ico" type="image/x-icon">
|
||||
<link rel="stylesheet" href="/web/static/lib/fontawesome/css/font-awesome.css">
|
||||
<link rel="stylesheet" href="/web/static/lib/bootstrap/css/bootstrap.css">
|
||||
<script src="/web/static/lib/jquery/jquery.js" type="text/javascript"></script>
|
||||
<script src="/web/static/lib/bootstrap/js/modal.js"></script>
|
||||
<script src="/web/static/lib/bootstrap/js/tooltip.js"></script>
|
||||
<script src="/web/static/lib/bootstrap/js/dropdown.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
// Little eye
|
||||
$('body').on('mousedown','.o_little_eye',function(ev) {
|
||||
$(ev.target).siblings('input').prop('type','text');
|
||||
});
|
||||
$('body').on('mouseup','.o_little_eye',function(ev) {
|
||||
$(ev.target).siblings('input').prop('type','password');
|
||||
});
|
||||
// db modal
|
||||
$('body').on('click','.o_database_action', function(ev) {
|
||||
ev.preventDefault();
|
||||
var db = $(ev.currentTarget).data('db');
|
||||
var target = $(ev.currentTarget).data('target');
|
||||
$(target).find('input[name=name]').val(db);
|
||||
$(target).modal();
|
||||
});
|
||||
// close modal on submit
|
||||
$('.modal').on('click','input[type="submit"]', function(ev) {
|
||||
var modal = $(this).parentsUntil('body', '.modal');
|
||||
if (modal.hasClass('o_database_backup')) {
|
||||
$(modal).modal('hide');
|
||||
if (!$('.alert-backup-long').length) {
|
||||
$('.list-group').before("<div class='alert alert-info alert-backup-long'>The backup may take some time before being ready</div>");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
{% macro master_input() -%}
|
||||
<div class="form-group">
|
||||
{% if insecure %}
|
||||
<input type="hidden" name="master_pwd" class="form-control" value="admin"/>
|
||||
{% else %}
|
||||
<label for="master_pwd" class="control-label">Master Password</label>
|
||||
<input id="master_pwd" type="password" name="master_pwd" class="form-control" required="required" autofocus="autofocus"/>
|
||||
{% endif %}
|
||||
</div>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro create_form() -%}
|
||||
<p>Planet Odoo is up and running! <br />
|
||||
Create a new database by filling out the form,
|
||||
you'll be able to install your first app in a minute.</p>
|
||||
{{ master_input() }}
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<label for="name" class="control-label">Database Name</label>
|
||||
<input id="name" type="text" name="name" class="form-control" required="required" autocomplete="off" pattern="{{ pattern }}" title="Only alphanumerical characters, underscore, hyphen and dot are allowed"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<label for="login" class="control-label">Email</label>
|
||||
<input id="login" type="text" name="login" class="form-control" required="required" autocomplete="off"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group has-feedback">
|
||||
<label for="password" class="control-label">Password</label>
|
||||
<input id="password" type="password" name="password" class="form-control" required="required" autocomplete="off"/>
|
||||
<span class="fa fa-eye o_little_eye form-control-feedback" aria-hidden="true" style="cursor: pointer; pointer-events: auto"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label for="lang" class="control-label">Language</label>
|
||||
<select id="lang" name="lang" class="form-control" required="required" autocomplete="off">
|
||||
{% for lang in langs %}
|
||||
<option {% if lang[0] == "en_US" %}selected="selected" {% endif %}value="{{ lang[0] }}">{{ lang[1] }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="country" class="control-label">Country</label>
|
||||
<select id="country" name="country_code" class="form-control" autocomplete="off">
|
||||
<option value=""></option>
|
||||
{% for country in countries %}
|
||||
<option value="{{ country[0] }}">{{ country[1] }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input name="demo" type="checkbox" class="pull-right" value="1">
|
||||
<span>Load demonstration data</span>
|
||||
<span class="text-muted"> (Check this box to evaluate Planet Odoo)</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{%- endmacro %}
|
||||
|
||||
<body class="container">
|
||||
<!-- Database List -->
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3 o_database_list">
|
||||
<div class="text-center">
|
||||
<img src="/backend_debranding_v12/static/src/img/logo.png" class="img-responsive center-block" style="width:70%;"/>
|
||||
</div>
|
||||
{% if insecure and databases %}
|
||||
<div class="alert alert-warning">
|
||||
Warning, your Planet Odoo database manager is not protected.
|
||||
Please <a href="#" data-toggle="modal" data-target=".o_database_master">set a master password</a>
|
||||
to secure it.
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if error %}
|
||||
<div class="alert alert-danger">{{ error }}</div>
|
||||
{% endif %}
|
||||
{% if databases %}
|
||||
<div class="list-group">
|
||||
{% for db in databases %}
|
||||
<a href="/web?db={{ db }}" class="list-group-item">
|
||||
{{ db }}
|
||||
{% if manage %}
|
||||
<div class="text-right pull-right">
|
||||
<span data-db="{{ db }}" data-target=".o_database_backup" class="o_database_action btn-link"><i class="fa fa-floppy-o fa-fw"></i> Backup</span>
|
||||
<span data-db="{{ db }}" data-target=".o_database_duplicate" class="o_database_action btn-link"><i class="fa fa-files-o fa-fw"></i> Duplicate</span>
|
||||
<span data-db="{{ db }}" data-target=".o_database_delete" class="o_database_action btn-link"><i class="fa fa-trash-o fa-fw"></i> Delete</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if manage %}
|
||||
<div class="text-left">
|
||||
<button type="button" data-toggle="modal" data-target=".o_database_create" class="btn btn-sm btn-primary">
|
||||
Create Database
|
||||
</button>
|
||||
<button type="button" data-toggle="modal" data-target=".o_database_restore" class="btn btn-sm btn-primary">
|
||||
Restore Database
|
||||
</button>
|
||||
<button type="button" data-toggle="modal" data-target=".o_database_master" class="btn btn-sm btn-primary">
|
||||
Set Master Password
|
||||
</button>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="text-center">
|
||||
<a href="/web/database/manager">Manage databases</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<form role="form" action="/web/database/create" method="post">
|
||||
{{ create_form() }}
|
||||
<input type="submit" value="Create database" class="btn btn-primary pull-left"/>
|
||||
</form>
|
||||
<a role="button" data-toggle="modal" data-target=".o_database_restore" class="btn btn-link">
|
||||
or restore a database
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Create -->
|
||||
<div class="modal fade o_database_create" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form role="form" action="/web/database/create" method="post">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Create Database</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ create_form() }}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<input type="submit" value="Continue" class="btn btn-primary pull-right"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Restore -->
|
||||
<div class="modal fade o_database_restore" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Restore Database</h4>
|
||||
</div>
|
||||
<form id="form_restore_db" role="form" action="/web/database/restore" method="post" enctype="multipart/form-data">
|
||||
<div class="modal-body">
|
||||
{{ master_input() }}
|
||||
<div class="form-group">
|
||||
<label for="backup_file" class="control-label">File</label>
|
||||
<input id="backup_file" type="file" name="backup_file" class="required"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name" class="control-label">Database Name</label>
|
||||
<input id="name" type="text" name="name" class="form-control" required="required" pattern="{{ pattern }}" title="Only alphanumerical characters, underscore, hyphen and dot are allowed"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="copy">This database might have been moved or copied.</label>
|
||||
<p class="help-block">In order to avoid conflicts between databases, Planet Odoo needs to know if this database was moved or copied.
|
||||
If you don't know, answer "This database is a copy".</p>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input name="copy" type="radio" class="pull-right" value="true" checked="1">
|
||||
This database is a copy
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input name="copy" type="radio" class="pull-right" value="false">
|
||||
This database was moved
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<input type="submit" value="Continue" class="btn btn-primary pull-right"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Master password -->
|
||||
<div class="modal fade o_database_master" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Set Master Password</h4>
|
||||
</div>
|
||||
<form id="form_change_pwd" role="form" action="/web/database/change_password" method="post">
|
||||
<div class="modal-body">
|
||||
<p>The master password is required to create, delete, dump or restore databases.</p>
|
||||
{{ master_input() }}
|
||||
<div class="form-group has-feedback">
|
||||
<label for="master_pwd_new" class="control-label">New Master Password</label>
|
||||
<input id="master_pwd_new" type="password" name="master_pwd_new" class="form-control" required="required" autocomplete="off"/>
|
||||
<span class="fa fa-eye o_little_eye form-control-feedback" aria-hidden="true" style="cursor: pointer; pointer-events: auto"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<input type="submit" value="Continue" class="btn btn-primary pull-right"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Duplicate DB -->
|
||||
<div class="modal fade o_database_duplicate" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Duplicate Database</h4>
|
||||
</div>
|
||||
<form id="form-duplicate-db" role="form" action="/web/database/duplicate" method="post">
|
||||
<div class="modal-body">
|
||||
{{ master_input() }}
|
||||
<div class="form-group">
|
||||
<label for="name" class="control-label">Database Name</label>
|
||||
<input id="name" type="text" name="name" class="form-control" required="required" readonly="readonly"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="new_name" class="control-label">New Name</label>
|
||||
<input id="new_name" type="text" name="new_name" class="form-control" required="required" pattern="{{ pattern }}" title="Only alphanumerical characters, underscore, hyphen and dot are allowed"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<input type="submit" value="Continue" class="btn btn-primary pull-right"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Drop DB -->
|
||||
<div class="modal fade o_database_delete" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Delete Database</h4>
|
||||
</div>
|
||||
<form id="form_drop_db" role="form" action="/web/database/drop" method="post">
|
||||
<div class="modal-body">
|
||||
{{ master_input() }}
|
||||
<div class="form-group">
|
||||
<label for="name" class="control-label">Database</label>
|
||||
<input id="name" type="text" name="name" class="form-control" required="required" readonly="readonly"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<input type="submit" value="Delete" class="btn btn-primary pull-right"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Backup DB -->
|
||||
<div class="modal fade o_database_backup" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Backup Database</h4>
|
||||
</div>
|
||||
<form id="form_backup_db" role="form" action="/web/database/backup" method="post">
|
||||
<div class="modal-body">
|
||||
{{ master_input() }}
|
||||
<div class="form-group">
|
||||
<label for="name" class="control-label">Database Name</label>
|
||||
<input id="name" type="text" name="name" class="form-control" required="required" readonly="readonly"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="backup_format" class="control-label">Backup Format</label>
|
||||
<select id="backup_format" name="backup_format" id="backup_format" class="form-control" required="required">
|
||||
<option value="zip">zip (includes filestore)</option>
|
||||
<option value="dump">pg_dump custom format (without filestore)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<input type="submit" value="Backup" class="btn btn-primary pull-right"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,5 +0,0 @@
|
|||
[.ShellClassInfo]
|
||||
InfoTip=This folder is shared online.
|
||||
IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
|
||||
IconIndex=16
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="debranding_title_js" name="Debranding title JS" inherit_id="web.assets_backend">
|
||||
<xpath expr="." position="inside">
|
||||
<link rel="stylesheet" href="/backend_debranding_v12/static/src/css/web.css" />
|
||||
<script type="text/javascript" src="/backend_debranding_v12/static/src/js/title.js"></script>
|
||||
<script type="text/javascript" src="/backend_debranding_v12/static/src/js/dialog.js"></script>
|
||||
<script type="text/javascript" src="/backend_debranding_v12/static/src/js/announcement.js"></script>
|
||||
<script type="text/javascript" src="/backend_debranding_v12/static/src/js/dashboard.js"></script>
|
||||
<!--<script type="text/javascript" src="/backend_debranding_v12/static/src/js/field_upgrade.js"></script>-->
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
|
@ -1,49 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="login_layout" inherit_id="web.login_layout" priority="8">
|
||||
<xpath expr="//div[@t-if='not disable_footer']" position="replace"></xpath>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="web_layout" inherit_id="web.layout">
|
||||
<!--commented as of now-->
|
||||
<xpath expr="//link[@rel='shortcut icon']" position="replace">
|
||||
<t t-set="favicon" t-value="request and request.env['ir.config_parameter'].sudo().get_param('backend_debranding_v12.favicon_url', '').strip() or ''" />
|
||||
<t t-if="favicon">
|
||||
<link rel="shortcut icon" t-att-href="favicon" type="image/x-icon" />
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
|
||||
<!-- <template id="menu_secondary" inherit_id="web.menu_secondary" priority="32">
|
||||
<xpath expr="//div[@class='oe_footer']" position="replace">&ndash;> <!&ndash;
|
||||
<div class="oe_footer">&ndash;> <!&ndash;
|
||||
<span>Implementado por <a target='_new' href="http://www.manexware.com" style='color:#0E4D95;text-decoration:none;'>Manexware</a></span>&ndash;> <!&ndash;
|
||||
</div>&ndash;> <!&ndash;
|
||||
</xpath>&ndash;> <!&ndash;Cambio para compatibilidad con version 10&ndash;>
|
||||
<xpath expr="//div[@class='o_sub_menu_footer']" position="replace">
|
||||
<div class="o_sub_menu_footer">
|
||||
<span>Implementado por <a target='_new' href="http://www.manexware.com" style='color:#0E4D95;text-decoration:none;'>Manexware</a></span>
|
||||
</div>
|
||||
</xpath>
|
||||
</template> -->
|
||||
<data noupdate="1">
|
||||
<record id="custom_help" model="ir.config_parameter">
|
||||
<field name="key">backend_debranding_v12.new_name</field>
|
||||
<field name="value">Planet Odoo</field>
|
||||
</record>
|
||||
<record id="custom_title" model="ir.config_parameter">
|
||||
<field name="key">backend_debranding_v12.new_title</field>
|
||||
<field name="value">Planet Odoo</field>
|
||||
</record>
|
||||
<record id="favicon" model="ir.config_parameter">
|
||||
<field name="key">backend_debranding_v12.favicon_url</field>
|
||||
<field name="value">/backend_debranding_v12/static/src/img/planet_odoo64x.png</field>
|
||||
</record>
|
||||
<record id="custom_person" model="ir.config_parameter">
|
||||
<field name="key">backend_debranding_v12.planner_footer</field>
|
||||
<field name="value">Planet Odoo</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
|
@ -1,52 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
To change this license header, choose License Headers in Project Properties.
|
||||
To change this template file, choose Tools | Templates
|
||||
and open the template in the editor.
|
||||
-->
|
||||
|
||||
|
||||
<odoo>
|
||||
<data>
|
||||
<template id="web_web_layout_inherit" inherit_id="web.layout" name="Web layout">
|
||||
<xpath expr="//title" position="replace">
|
||||
<title t-esc="title or 'Planet Odoo'"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="frontend_layout" inherit_id="portal.frontend_layout" name="Frontend Layout">
|
||||
<!--<xpath expr="//img[@t-att-title='res_company.name']" position="replace">-->
|
||||
<!--<img src="/logo.png" t-att-alt="'Logo of %s' % res_company.name" t-att-title="res_company.name"/>-->
|
||||
<!--</xpath>-->
|
||||
<xpath expr="//a[@class='navbar-brand logo']" position="replace">
|
||||
<a href="/" class="navbar-brand logo">
|
||||
<img src="/logo.png" t-att-alt="'Logo of %s' % res_company.name" t-att-title="res_company.name"/>
|
||||
</a>
|
||||
</xpath>
|
||||
<!--<xpath expr="//footer[hasclass('o_footer')]" position="replace">-->
|
||||
<!--<div class="container mt16 mb16" id="footer">-->
|
||||
<!--<div class="float-right mb16" t-ignore="true" t-if="not editable">-->
|
||||
<!--Powered by <a target="_blank" href="http://www.planet-odoo.com/">Odoo</a>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</xpath>-->
|
||||
<!--<xpath expr="//footer[@class='bg-light o_footer']" position="replace">-->
|
||||
<!--<div class="container mt16 mb16" id="footer">-->
|
||||
<!--<div class="float-right mb16" t-ignore="true" t-if="not editable">-->
|
||||
<!--Powered by <a target="_blank" href="http://www.planet-odoo.com/">Odoo</a>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</xpath>-->
|
||||
</template>
|
||||
|
||||
|
||||
<!--<template id="web_menu_secondary_inherit" inherit_id="web.menu_secondary" name="Secondary Menu1">-->
|
||||
<!--<xpath expr="//div[@class='o_sub_menu_footer']" position="replace">-->
|
||||
<!--<div class="oe_footer">-->
|
||||
<!--Powered by <a href="http://www.planet-odoo.com/" target="_blank"><span>Planet Odoo</span></a>-->
|
||||
<!--</div>-->
|
||||
<!--</xpath>-->
|
||||
<!--</template>-->
|
||||
</data>
|
||||
</odoo>
|
|
@ -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 <https://cybrosys.com/>`__
|
||||
|
||||
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 <https://cybrosys.com/>`__
|
||||
|
||||
Further information
|
||||
===================
|
||||
HTML Description: `<static/description/index.html>`__
|
||||
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#############################################################################
|
||||
#
|
||||
# Cybrosys Technologies Pvt. Ltd.
|
||||
#
|
||||
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
|
||||
# Author: Tintuk Tomin(<https://www.cybrosys.com>)
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
from . import controllers
|
||||
from . import models
|
|
@ -0,0 +1,46 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#############################################################################
|
||||
#
|
||||
# Cybrosys Technologies Pvt. Ltd.
|
||||
#
|
||||
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
|
||||
# Author: Tintuk Tomin(<https://www.cybrosys.com>)
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
{
|
||||
'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
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#############################################################################
|
||||
#
|
||||
# Cybrosys Technologies Pvt. Ltd.
|
||||
#
|
||||
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
|
||||
# Author: Tintuk Tomin(<https://www.cybrosys.com>)
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
from . import controllers
|
|
@ -0,0 +1,147 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#############################################################################
|
||||
#
|
||||
# Cybrosys Technologies Pvt. Ltd.
|
||||
#
|
||||
# Copyright (C) 2019-TODAY Cybrosys Technologies(
|
||||
# <https://www.cybrosys.com>).
|
||||
# Author: Tintuk Tomin(<https://www.cybrosys.com>)
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
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)
|
|
@ -0,0 +1,11 @@
|
|||
## Module <odoo-debrand>
|
||||
|
||||
#### 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.
|
|
@ -0,0 +1,23 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#############################################################################
|
||||
#
|
||||
# Cybrosys Technologies Pvt. Ltd.
|
||||
#
|
||||
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
|
||||
# Author: Tintuk Tomin(<https://www.cybrosys.com>)
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
from . import models
|
|
@ -0,0 +1,41 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
#############################################################################
|
||||
#
|
||||
# Cybrosys Technologies Pvt. Ltd.
|
||||
#
|
||||
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
|
||||
# Author: Tintuk Tomin(<https://www.cybrosys.com>)
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
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')
|
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 127 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 100 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 230 KiB |
After Width: | Height: | Size: 196 KiB |
After Width: | Height: | Size: 192 KiB |