remove powered by odoo
This commit is contained in:
parent
7d2cc0e4af
commit
55946e4a79
|
|
@ -0,0 +1 @@
|
|||
from . import controllers
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from . import main
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
# -*- 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.odoo-debranding',
|
||||
"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)
|
||||
|
|
@ -0,0 +1 @@
|
|||
from . import odoodebrand
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
from odoo import models, fields, api, _
|
||||
from odoo.exceptions import Warning
|
||||
|
||||
class WebsiteConfig(models.Model):
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
company_logo = fields.Binary(related='website_id.company_logo',
|
||||
string="Company Logo",
|
||||
help="This field holds the image"
|
||||
" used for the Company Logo",
|
||||
readonly=False)
|
||||
company_name = fields.Char(related='website_id.company_name',
|
||||
string="Company Name",
|
||||
readonly=False)
|
||||
company_website = fields.Char(related='website_id.company_website',
|
||||
readonly=False)
|
||||
|
||||
|
|
@ -24,6 +24,31 @@
|
|||
</html>
|
||||
</template>
|
||||
|
||||
<template id="web.login_layout" name="Login Layout">
|
||||
<t t-call="web.frontend_layout">
|
||||
<t t-set="html_data" t-value="{'style': 'height: 100%;'}"/>
|
||||
<t t-set="body_classname" t-value="'bg-100'"/>
|
||||
<t t-set="no_header" t-value="True"/>
|
||||
<t t-set="no_footer" t-value="True"/>
|
||||
|
||||
<div class="container py-5">
|
||||
<div t-attf-class="card border-0 mx-auto bg-100 {{login_card_classes}} o_database_list" style="max-width: 300px;">
|
||||
<div class="card-body">
|
||||
<div t-attf-class="text-center pb-3 border-bottom {{'mb-3' if form_small else 'mb-4'}}">
|
||||
<img t-attf-src="/web/binary/company_logo{{ '?dbname='+db if db else '' }}" alt="Logo" style="max-height:120px; max-width: 100%; width:auto"/>
|
||||
</div>
|
||||
<t t-raw="0"/>
|
||||
<div class="text-center small mt-4 pt-3 border-top" t-if="not disable_footer">
|
||||
<t t-if="not disable_database_manager">
|
||||
<a class="border-right pr-2 mr-1" href="/web/database/manager">Manage Databases</a>
|
||||
</t>
|
||||
<!-- <a href="https://www.odoo.com?utm_source=db&utm_medium=auth" target="_blank">Powered by <span>Odoo</span></a>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
|
||||
<record id="res_config_settings_view_form_inherit" model="ir.ui.view">
|
||||
|
|
|
|||
Loading…
Reference in New Issue