Browse Source

[ADD] Initial Commit

pull/124/head
AjmalCybro 7 years ago
parent
commit
0a3dfd56d3
  1. 56
      odoo-debrand/README.rst
  2. 3
      odoo-debrand/__init__.py
  3. 40
      odoo-debrand/__manifest__.py
  4. 3
      odoo-debrand/controllers/__init__.py
  5. 109
      odoo-debrand/controllers/controllers.py
  6. 7
      odoo-debrand/doc/changelog.rst
  7. 3
      odoo-debrand/models/__init__.py
  8. 24
      odoo-debrand/models/models.py
  9. 2
      odoo-debrand/security/ir.model.access.csv
  10. BIN
      odoo-debrand/static/description/banner.png
  11. BIN
      odoo-debrand/static/description/cybro_logo.png
  12. BIN
      odoo-debrand/static/description/cybrosys-odoo-debranding-1.jpg
  13. BIN
      odoo-debrand/static/description/cybrosys-odoo-debranding-2.jpg
  14. BIN
      odoo-debrand/static/description/cybrosys-odoo-debranding-3.jpg
  15. BIN
      odoo-debrand/static/description/cybrosys-odoo-debranding-4.jpg
  16. BIN
      odoo-debrand/static/description/cybrosys-odoo-debranding-5.jpg
  17. BIN
      odoo-debrand/static/description/cybrosys-odoo-debranding-6.jpg
  18. BIN
      odoo-debrand/static/description/icon.png
  19. 399
      odoo-debrand/static/description/index.html
  20. 99
      odoo-debrand/static/src/js/title.js
  21. 37
      odoo-debrand/static/src/xml/base.xml
  22. 363
      odoo-debrand/views/database_manager_extend.html
  23. 42
      odoo-debrand/views/views.xml

56
odoo-debrand/README.rst

@ -0,0 +1,56 @@
.. image:: https://img.shields.io/badge/licence-GPL--3-blue.svg
:target: http://www.gnu.org/licenses/gpl-3.0-standalone.html
:alt: License: GPL-3
===============
Odoo Debranding
===============
Debranding of odoo with the given configurations under Website Admin -> Debranding Configurations.
Will replace:
- Page Title
- Odoo from Popups
- Settings Odoo branding Items
- User Drop down Odoo links
- Website Title, footer
- Powered By Odoo on Backend by your company name
- Odoo label from Dialogues
- Odoo Database Selector Logo, Labels
- Copyright @odoo with your company on website page
Installation
============
To install this module from odoo apps after updating the app list.
Usage
=====
Fill the configuration under Website Admin. Clear Browser Image caches after installing the module.
Known issues / Roadmap
======================
* ...
Bug Tracker
===========
Contact odoo@cybrosys.com
Contributors
------------
* Tintuk Tomin <tintuk@cybrosys.in>
Maintainer
----------
This module is maintained by Cybrosys Technologies.
For support and more information, please visit https://www.cybrosys.com.

3
odoo-debrand/__init__.py

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import controllers
from . import models

40
odoo-debrand/__manifest__.py

@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': "Odoo Debranding",
'version': "12.0.1.0",
'summary': """Debrand Odoo""",
'description': """Debrand Odoo""",
'author': "Cybrosys Techno Solutions",
'company': "Cybrosys Techno Solutions",
'website': "https://cybrosys.com/",
'category': 'Tools',
'depends': ['base', 'im_livechat', 'website'],
'data': [
'views/views.xml'],
'demo': [],
'qweb': ["static/src/xml/base.xml"],
'images': ['static/description/banner.png'],
'license': "LGPL-3",
'installable': True,
'application': False
}

3
odoo-debrand/controllers/__init__.py

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import controllers

109
odoo-debrand/controllers/controllers.py

@ -0,0 +1,109 @@
# -*- coding: utf-8 -*-
import imghdr
import json
import io
import base64
import functools
from odoo import http, tools
import odoo, os, sys, jinja2
from odoo.addons.web.controllers.main import Database
from odoo.addons.web.controllers import main
from odoo.tools.mimetypes import guess_mimetype
from odoo.addons.web.controllers.main import Binary
from odoo.modules import get_resource_path
from io import StringIO
from odoo.http import request
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['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)

7
odoo-debrand/doc/changelog.rst

@ -0,0 +1,7 @@
Changelog
=========
`12.0.1.0.0`
------------
- Initial commit

3
odoo-debrand/models/__init__.py

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import models

24
odoo-debrand/models/models.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
import base64
import os
from odoo import models, fields, api, tools
class OdooDebrand(models.Model):
_inherit = "website"
def get_company_logo(self):
id = self.env.user.company_id.id
self.company_logo_url ="/web/image/res.company/%s/logo"%(id)
def get_favicon(self):
id = self.env['website'].sudo().search([])
self.favicon_url ="/web/image/website/%s/favicon"%(id[0].id)
print("Wesite = ", self.favicon_url)
company_logo = fields.Binary()
favicon_url = fields.Text("Url", compute='get_favicon')
company_logo_url = fields.Text("Url", compute='get_company_logo')

2
odoo-debrand/security/ir.model.access.csv

@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_odoo-debrand_odoo-debrand,odoo-debrand.odoo-debrand,model_odoo-debrand_odoo-debrand,,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_odoo-debrand_odoo-debrand odoo-debrand.odoo-debrand model_odoo-debrand_odoo-debrand 1 1 1 1

BIN
odoo-debrand/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

BIN
odoo-debrand/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
odoo-debrand/static/description/cybrosys-odoo-debranding-1.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

BIN
odoo-debrand/static/description/cybrosys-odoo-debranding-2.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

BIN
odoo-debrand/static/description/cybrosys-odoo-debranding-3.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

BIN
odoo-debrand/static/description/cybrosys-odoo-debranding-4.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

BIN
odoo-debrand/static/description/cybrosys-odoo-debranding-5.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

BIN
odoo-debrand/static/description/cybrosys-odoo-debranding-6.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

BIN
odoo-debrand/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

399
odoo-debrand/static/description/index.html

@ -0,0 +1,399 @@
<section class="oe_container" style="background-image:url(https://www.cybrosys.com/images/odoo-index-header-banner.png);background-repeat:no-repeat;background-size:100%;padding: 4% 0% 2% 15%;background-position-y: -107px;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="font-size: 35px;color: #fff;font-weight: 900;text-transform: uppercase;text-align: left;margin: 0;margin-bottom: 16px;">
Odoo Debranding
</h2>
<h3 class="oe_slogan" style="font-size: 25px;color: #fff;font-weight: 600;text-align: left;opacity: 1;margin: 0 !important;">
Debrand Odoo Back-end + Front-End
</h3>
<h5 class="oe_slogan" style="text-align: left;background: #fff;width: 293px;padding: 10px;color: #080808 !important;opacity: 1 !important;font-weight: 600;font-size: 20px;">
<a style="color: #080808 !important;" href="https://www.cybrosys.com" target="_blank">Cybrosys Technologies</a>
</h5>
<a style="color: #080808 !important;" href="https://www.cybrosys.com" target="_blank">
<div style="width: 215px;margin-left: 57%;text-align: center;background: #ffffff;height: 215px;border-radius: 100%;display: flex;justify-content: center;align-items: center;box-shadow: 0 0 12px 4px #00000059;">
<img src="https://www.cybrosys.com/images/cybro-logo-oca.png" alt="cybrosys technologies" style="width: 180px;"/> </div>
</a>
</div>
</section>
<section class="oe_container" style="padding: 1% 0% 3% 15%;">
<div class="oe_row oe_spaced">
<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? Odoo Debranding module developed by Cybrosys Technologies
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>
<h3 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;padding: 2% 0% 0% 0%;">
Configuration
</h3>
<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;">
In Odoo 12 some of the debranding features are already removed compared to odoo 11. Branding like powered by in
both front end and back end is removed and website footer and copyright is already changed to company name in Odoo 12.
<br/><br/>
So in this debranding app, you need to set up the company logo, website name & favicon by your own from the settings option.
</h3>
</div>
</section>
<section class="oe_container" style="background-image:url(https://www.cybrosys.com/images/odoo-index-banner.png); background-repeat:no-repeat; background-size:cover;padding: 10% 0% 15% 15%;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Features
</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: 18px;">
<i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Modify database selector page
</h3>
<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: 18px;">
<i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Modify login page
</h3>
<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: 18px;">
<i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Remove Odoo's default favicon
</h3>
<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: 18px;">
<i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Updated "About" list
</h3>
<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: 18px;">
<i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Removed advertisements from the settings page
</h3>
<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: 18px;">
<i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Updated warning messages
</h3>
<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: 18px;">
<i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Page title modification
</h3>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Screenshots
</h2>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
As you see in the settings option you need to set up the Website name & favicon then only the change will be affected
in the title. Also you need to setup the company logo from the settings page to change the default logo.
</h3>
<div class="oe_row oe_spaced">
<img src="cybrosys-odoo-debranding-1.jpg" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div><i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Company logo in login page.</div>
</h3>
<div class="oe_row oe_spaced">
<img src="cybrosys-odoo-debranding-2.jpg" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div><i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Powered by in the front-end is removed.</div>
<div><i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Default title is changed.</div>
</h3>
<div class="oe_row oe_spaced">
<img src="cybrosys-odoo-debranding-3.jpg" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Updated the Odoo title in the messages.
</h3>
<div class="oe_row oe_spaced">
<img src="cybrosys-odoo-debranding-4.jpg" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div><i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Updated the Odoo title in the warning message</div>
</h3>
<div class="oe_row oe_spaced">
<img src="cybrosys-odoo-debranding-5.jpg" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div><i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Odoo promotional banners in the settings dashboard page is changed.</div>
<div><i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Odoo accounts and documentation is removed from the dropdown list.</div>
</h3>
<div class="oe_row oe_spaced">
<img src="cybrosys-odoo-debranding-6.jpg" alt="" style="width: 95%;"/>
</div>
</div>
</section>
<section class="oe_container" style="padding: 7px 0% 0% 3%;">
<div class="oe_row oe_spaced">
<a style="color: #080808 !important;" href="https://apps.odoo.com/apps/modules/browse?search=cybrosys" target="_blank"><img src="https://www.cybrosys.com/images/view-more-apps.jpg" alt="cybrosys technologies" style="width: 100%;margin-bottom: 50px;"/></a>
</div>
</section>
<section class="oe_container" style="padding: 1% 0% 0% 3%;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Our Services
</h2>
<div style="display:flex;padding-top: 20px;justify-content: space-between;">
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/odoo-customization-and-installation/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-customization.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-customization-and-installation/" target="_blank">
Odoo Customization
</a>
</h3>
</div>
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/odoo-erp-implementation/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-erp-implementation.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-erp-implementation/" target="_blank">
Odoo Implementation </a>
</h3>
</div>
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/odoo-erp-integration/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-erp-integration.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-erp-integration/" target="_blank">
Odoo Integration
</a>
</h3>
</div>
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/odoo-erp-support/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-erp-support.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-erp-support/" target="_blank">
Odoo Support</a>
</h3>
</div>
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/hire-odoo-developer/" target="_blank">
<img src="https://www.cybrosys.com/images/hire-odoo-developer.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/hire-odoo-developer/" target="_blank">
Hire Odoo Developers</a>
</h3>
</a>
</div>
</div>
</div>
</section>
<section class="oe_container" style="padding: 1% 0% 0% 3%;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Our Industries
</h2>
<div style="display:flex;justify-content: space-between;flex-wrap:wrap;">
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/best-trading-erp/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-1.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/best-trading-erp/" target="_blank">
Trading
</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Easily procure and sell your products.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/manufacturing-erp-software/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-2.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/manufacturing-erp-software/" target="_blank">
Manufacturing</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Plan, track and schedule your operations.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/restaurant-management/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-3.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/restaurant-management/" target="_blank">
Restaurant</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Run your bar or restaurant methodical.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/pos/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-4.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/pos/" target="_blank">
POS</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Easy configuring and convivial selling.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/ecommerce-website/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-5.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 0px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/ecommerce-website/" target="_blank">
E-commerce & Website</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Mobile friendly, awe-inspiring product pages.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/hotel-management-erp/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-6.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/hotel-management-erp/" target="_blank">
Hotel Management</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
An all-inclusive hotel management application.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/education-erp-software/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-7.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/education-erp-software/" target="_blank">
Education</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
A Collaborative platform for educational management.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/service-management/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-8.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/service-management/" target="_blank">
Service Management</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Keep track of services and invoice accordingly.
</h3>
</div>
</div>
</div>
</div>
</section>
<section class="oe_container" style="background-image:url(https://www.cybrosys.com/images/odoo-index-footer-bg.png); background-repeat:no-repeat; background-size:100%;padding: 13% 0% 6% 0%;">
<div class="oe_slogan" style="margin-top:10px !important;margin-bottom: 0px;">
<div>
<a style="color: #5c5c5c !important;border-radius: 0;background: none;border: none;background: #fff;box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62, 57, 107, 0.05);border-radius: 30px;font-size: 12px;padding: 9px 26px;margin-right: 9px;width: 200px;text-transform: capitalize;" class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" href="mailto:odoo@cybrosys.com"><i class="fa fa-envelope"></i> Email us </a>
<a style="color: #5c5c5c !important;border-radius: 0;background: none;border: none;background: #fff;box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62, 57, 107, 0.05);border-radius: 30px;font-size: 12px;padding: 9px 26px;margin-right: 9px;width: 200px;text-transform: capitalize;" class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com/contact/"><i class="fa fa-phone"></i> Contact Us </a>
<a style="color: #5c5c5c !important;border-radius: 0;background: none;border: none;background: #fff;box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62, 57, 107, 0.05);border-radius: 30px;font-size: 12px;padding: 9px 26px;margin-right: 9px;width: 200px;text-transform: capitalize;" class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com/contact/"><i class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="https://www.cybrosys.com/images/logo.png" style="width: 190px; margin-bottom: 25px;margin-top: 30px;" class="center-block">
<div>
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px; ;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
</div>
</div>
</section>

99
odoo-debrand/static/src/js/title.js

@ -0,0 +1,99 @@
odoo.define('odoo-debrand-11.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
console.log("CrashManager",CrashManager)
var concurrency = require('web.concurrency');
var mixins = require('web.mixins');
var session = require('web.session');
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({
init: function (parent) {
this._super();
var obj = this
this._rpc({
fields: ['name',],
domain: [],
model: 'website',
method: 'search_read',
limit: 1,
context: session.user_context,
}).done(function(result){
obj.set('title_part', {"zopenerp": result[0].name});
});
},
});
var ExceptionHandler = {
/**
* @param parent The parent.
* @param error The error object as returned by the JSON-RPC implementation.
*/
init: function(parent, error) {},
/**
* Called to inform to display the widget, if necessary. A typical way would be to implement
* this interface in a class extending instance.web.Dialog and simply display the dialog in this
* method.
*/
display: function() {},
};
var RedirectWarningHandler = Dialog.extend(ExceptionHandler, {
init: function(parent, error) {
this._super(parent);
this.error = error;
},
display: function() {
var self = this;
var error = this.error;
error.data.message = error.data.arguments[0];
new Dialog(this, {
size: 'medium',
title: _.str.capitalize(error.type) || _t("Warning"),
buttons: [
{text: error.data.arguments[2], classes : "btn-primary", click: function() {
window.location.href = '#action='+error.data.arguments[1];
self.destroy();
}},
{text: _t("Cancel"), click: function() { self.destroy(); }, close: true}
],
$content: QWeb.render('CrashManager.warning', {error: error}),
}).open();
}
});
core.crash_registry.add('odoo.exceptions.RedirectWarning', RedirectWarningHandler);
function session_expired(cm) {
return {
display: function () {
cm.show_warning({type: _t("Session Expired"), data: {message: _t("Your Odoo session expired. Please refresh the current web page.")}});
}
}
}
core.crash_registry.add('odoo.http.SessionExpiredException', session_expired);
});

37
odoo-debrand/static/src/xml/base.xml

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-extend="UserMenu">
<t t-jquery="div.dropdown-menu" t-operation="replace">
<ul class="dropdown-menu" role="menu">
<li class="divider"/>
<li><a href="#" data-menu="settings">Preferences</a></li>
<li><a href="#" data-menu="logout">Log out</a></li>
</ul>
</t>
</t>
<t t-extend="DashboardMain">
<t t-jquery=".o_web_settings_dashboard" t-operation="replace">
<div class="container-fluid o_web_settings_dashboard">
<div class="row">
<div class="o_web_settings_dashboard_enterprise"/>
<div class="col-md-3 col-sm-6 col-xs-12 o_web_settings_dashboard_col">
<div class="text-center o_web_settings_dashboard_invitations"></div>
<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>
</div>
</t>
</t>
<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>
</templates>

363
odoo-debrand/views/database_manager_extend.html

@ -0,0 +1,363 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>{{ website_name }}</title>
<link type="image/x-icon" rel="shortcut icon" href="{{ favicon }}"/>
<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 type="text/javascript" src="/web/static/lib/popper/popper.js"></script>
<script type="text/javascript" src="/web/static/lib/bootstrap/js/index.js"></script>
<script type="text/javascript" src="/web/static/lib/bootstrap/js/util.js"></script>
<script type="text/javascript" src="/web/static/lib/bootstrap/js/alert.js"></script>
<script type="text/javascript" src="/web/static/lib/bootstrap/js/button.js"></script>
<script type="text/javascript" src="/web/static/lib/bootstrap/js/carousel.js"></script>
<script type="text/javascript" src="/web/static/lib/bootstrap/js/collapse.js"></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" src="/web/static/lib/bootstrap/js/popover.js"></script>
<script type="text/javascript" src="/web/static/lib/bootstrap/js/scrollspy.js"></script>
<script type="text/javascript" src="/web/static/lib/bootstrap/js/tab.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>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"/>
</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 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="{{ company_logo_url }}" class="img-responsive center-block"/>
</div>
{% if insecure and databases %}
<div class="alert alert-warning">
<!--Add your company name-->
Warning, {{ company_name }} 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">&times;</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">&times;</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"/>
</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, {{ company_name }} 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">&times;</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">&times;</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"/>
</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">&times;</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">&times;</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>

42
odoo-debrand/views/views.xml

@ -0,0 +1,42 @@
<odoo>
<template id="debranding_title" name="Debranding title JS" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/odoo-debrand/static/src/js/title.js"/>
</xpath>
</template>
<template id="remove_promotion" inherit_id="website.brand_promotion" name="Debrand Promotion">
<xpath expr="//div[hasclass('o_brand_promotion')]" position="replace">
<div class="o_brand_promotion">
<!--<img src="/web/static/src/img/favicon.ico"/>-->
<!--Create a <a target="_blank" href="http://www.odoo.com/page/website-builder?utm_source=db&amp;utm_medium=website">free website</a> with-->
<!--<a target="_blank" class="badge badge-danger" href="http://www.odoo.com/page/website-builder?utm_source=db&amp;utm_medium=website">Odoo</a>-->
</div>
</xpath>
</template>
<template id="title_debrand" inherit_id="web.layout">
<xpath expr="//head" position="replace">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
<title t-esc="title or 'Odoo'"/>
<link type="image/x-icon" rel="shortcut icon" t-att-href="x_icon or '/web/image/website/0/favicon_url'"/>
<script type="text/javascript">
var odoo = {
csrf_token: "<t t-esc="request.csrf_token(None)"/>",
};
</script>
<t t-raw="head or ''"/>
</head>
</xpath>
</template>
</odoo>
Loading…
Cancel
Save