Browse Source

[CHG] Index Updated

pull/97/merge
Sreejith P 7 years ago
parent
commit
716d040cd5
  1. 5
      odoo-debrand/__manifest__.py
  2. 12
      odoo-debrand/controllers/controllers.py
  3. 0
      odoo-debrand/description/about.png
  4. 0
      odoo-debrand/description/banner.jpg
  5. 0
      odoo-debrand/description/configurations.png
  6. 0
      odoo-debrand/description/cybro_logo.png
  7. 0
      odoo-debrand/description/db-selector.png
  8. 0
      odoo-debrand/description/footer.png
  9. 0
      odoo-debrand/description/icon.png
  10. 0
      odoo-debrand/description/index.html
  11. 0
      odoo-debrand/description/odoo-title.png
  12. 0
      odoo-debrand/description/powered.png
  13. 0
      odoo-debrand/description/settings-dashboard.png
  14. 0
      odoo-debrand/description/warning.png
  15. 0
      odoo-debrand/description/website_footer.png
  16. 7
      odoo-debrand/doc/changelog.rst
  17. 3
      odoo-debrand/models/__init__.py
  18. 54
      odoo-debrand/static/src/js/title.js
  19. 41
      odoo-debrand/static/src/xml/base.xml
  20. 22
      odoo-debrand/views/templates.xml
  21. 144
      odoo-debrand/views/views.xml

5
odoo-debrand/__manifest__.py

@ -22,7 +22,7 @@
##############################################################################
{
'name': "Odoo Debranding",
'version': "10.0.1.0.0",
'version': "10.0.3.0",
'summary': """Debrand Odoo""",
'description': """Debrand Odoo""",
'author': "Cybrosys Techno Solutions",
@ -31,8 +31,7 @@
'category': 'Tools',
'depends': ['base', 'im_livechat', 'website'],
'data': [
'views/views.xml',
'views/templates.xml'],
'views/views.xml'],
'demo': [],
'qweb': ["static/src/xml/*.xml"],
'images': ['static/description/banner.jpg'],

12
odoo-debrand/controllers/controllers.py

@ -23,12 +23,12 @@ db_monodb = http.db_monodb
class BinaryCustom(Binary):
@http.route([
'/web/binary/company_logo',
'/logo',
'/logo.png',
], type='http', auth="none")
def company_logo(self, dbname=None, **kw):
@http.route([
'/web/binary/company_logo',
'/logo',
'/logo.png',
], type='http', auth="none")
def company_logo(self, dbname=None, **kw):
imgname = 'logo'
imgext = '.png'
company_logo = request.env['website'].sudo().search([])[0].company_logo

0
odoo-debrand/static/description/about.png → odoo-debrand/description/about.png

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

0
odoo-debrand/static/description/banner.jpg → odoo-debrand/description/banner.jpg

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 117 KiB

0
odoo-debrand/static/description/configurations.png → odoo-debrand/description/configurations.png

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

0
odoo-debrand/static/description/cybro_logo.png → odoo-debrand/description/cybro_logo.png

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

0
odoo-debrand/static/description/db-selector.png → odoo-debrand/description/db-selector.png

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

0
odoo-debrand/static/description/footer.png → odoo-debrand/description/footer.png

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

0
odoo-debrand/static/description/icon.png → odoo-debrand/description/icon.png

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

0
odoo-debrand/static/description/index.html → odoo-debrand/description/index.html

0
odoo-debrand/static/description/odoo-title.png → odoo-debrand/description/odoo-title.png

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

0
odoo-debrand/static/description/powered.png → odoo-debrand/description/powered.png

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

0
odoo-debrand/static/description/settings-dashboard.png → odoo-debrand/description/settings-dashboard.png

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

0
odoo-debrand/static/description/warning.png → odoo-debrand/description/warning.png

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

0
odoo-debrand/static/description/website_footer.png → odoo-debrand/description/website_footer.png

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 87 KiB

7
odoo-debrand/doc/changelog.rst

@ -0,0 +1,7 @@
Changelog
=========
`10.0.2.0.0`
------------
- Fixed Crash Issue on Un-installing.

3
odoo-debrand/models/__init__.py

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

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

@ -1,54 +0,0 @@
odoo.define('odoo-debrand.title', function(require) {
var core = require('web.core');
var utils = require('web.utils');
var QWeb = core.qweb;
var _t = core._t;
var ajax = require('web.ajax');
var Dialog = require('web.Dialog');
var WebClient = require('web.AbstractWebClient');
var CrashManager = require('web.CrashManager');
var Model = require('web.Model');
WebClient.include({
init: function(parent) {
this.client_options = {};
this._super(parent);
this.origin = undefined;
this._current_state = null;
this.menu_dm = new utils.DropMisordered();
this.action_mutex = new utils.Mutex();
var self = this;
new Model("website").call("search_read",[[], ['company_name']]).then(function (res) {
self.set('title_part', {"zopenerp": res && res[0] && res[0].company_name || ''});
});
},
});
CrashManager.include({
show_warning: function(error) {
if (!this.active) {
return;
}
new Dialog(this, {
size: 'medium',
title: (_.str.capitalize(error.type) || _t("Warning")),
subtitle: error.data.title,
$content: $('<div>').html(QWeb.render('CrashManager.warning', {error: error}))
}).open();
},
show_error: function(error) {
if (!this.active) {
return;
}
new Dialog(this, {
title: _.str.capitalize(error.type),
$content: QWeb.render('CrashManager.error', {error: error})
}).open();
},
show_message: function(exception) {
this.show_error({
type: _t("Client Error"),
message: exception,
data: {debug: ""}
});
},
});
});

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

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-extend="UserMenu">
<t t-jquery="ul.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="AppSwitcher.Content">-->
<!--<t t-jquery="div.o_application_switcher_footer" t-operation="replace">-->
<!--<img src="" width="96px" />-->
<!--</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>

22
odoo-debrand/views/templates.xml

@ -1,22 +0,0 @@
<openerp>
<data>
<!-- <template id="listing"> -->
<!-- <ul> -->
<!-- <li t-foreach="objects" t-as="object"> -->
<!-- <a t-attf-href="#{ root }/objects/#{ object.id }"> -->
<!-- <t t-esc="object.display_name"/> -->
<!-- </a> -->
<!-- </li> -->
<!-- </ul> -->
<!-- </template> -->
<!-- <template id="object"> -->
<!-- <h1><t t-esc="object.display_name"/></h1> -->
<!-- <dl> -->
<!-- <t t-foreach="object._fields" t-as="field"> -->
<!-- <dt><t t-esc="field"/></dt> -->
<!-- <dd><t t-esc="object[field]"/></dd> -->
<!-- </t> -->
<!-- </dl> -->
<!-- </template> -->
</data>
</openerp>

144
odoo-debrand/views/views.xml

@ -1,97 +1,100 @@
<openerp>
<data>
<record id="debrand_config" model="ir.ui.view">
<odoo>
<record id="debrand_config" model="ir.ui.view">
<field name="name">Debranding Configuration</field>
<field name="model">website.config.settings</field>
<field name="inherit_id" ref="website.view_website_config_settings"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='social']" position="after">
<group name="debrand_config" string="Debranding Configurations">
<label for="company_logo" string="Company Logo"/>
<xpath expr="//group[@name='social']" position="after">
<group name="debrand_config" string="Debranding Configurations">
<label for="company_logo" string="Company Logo"/>
<div>
<div id="company_logo" class="oe_inline">
<field name="company_logo"
widget="image"
class="oe_avatar"
options="{'preview_image': 'image_medium', 'size': [130, 130]}"
/>
</div>
</div>
<label for="company_favicon" string="Company Favicon"/>
<div>
<div id="company_favicon" class="oe_inline">
<field name="company_favicon"
widget="image"
class="oe_avatar"
options="{'preview_image': 'image_small', 'size': [30, 30]}"/>
</div>
</div>
<label for="company_name" string="Company Name"/>
<div>
<div id="company_logo" class="oe_inline">
<field name="company_logo"
widget="image"
class="oe_avatar"
options="{'preview_image': 'image_medium', 'size': [130, 130]}"
/>
<div id="company_name" class="oe_inline">
<field name="company_name"/>
</div>
</div>
<label for="company_favicon" string="Company Favicon"/>
<label for="company_website" string="Company Website"/>
<div>
<div id="company_favicon" class="oe_inline">
<field name="company_favicon"
widget="image"
class="oe_avatar"
options="{'preview_image': 'image_small', 'size': [30, 30]}"/>
<div id="company_website" class="oe_inline">
<field name="company_website"/>
</div>
</div>
<label for="company_name" string="Company Name"/>
<div>
<div id="company_name" class="oe_inline">
<field name="company_name"/>
</div>
</div>
<label for="company_website" string="Company Website"/>
<div>
<div id="company_website" class="oe_inline">
<field name="company_website"/>
</div>
</div>
</group>
</xpath>
</group>
</xpath>
</field>
</record>
</record>
<template id="login_layout" inherit_id="web.login_layout">
<xpath expr="//div[@class='text-center']" position="replace">
<xpath expr="//div[@class='text-center']" position="replace">
<div class="text-center" t-if="not disable_footer">
<t t-if="not disable_database_manager">
<a class="" href="/web/database/manager">Manage Databases</a> |
</t>
<a t-att-href="request.env['website'].sudo().search([])[0].company_name or ''" target="_blank">
<span t-esc="request.env['website'].sudo().search([])[0].company_name or ''"/></a>
</div>
</xpath>
<t t-if="not disable_database_manager">
<a class="" href="/web/database/manager">Manage Databases</a> |
</t>
<a t-att-href="request.env['website'].sudo().search([])[0].company_name or ''" target="_blank">
<span t-esc="request.env['website'].sudo().search([])[0].company_name or ''"/></a>
</div>
</xpath>
</template>
<template id="login_layout_secondary" inherit_id="web.menu_secondary">
<xpath expr="//div[@class='o_sub_menu_footer']" position="replace">
<div class="o_sub_menu_footer">
Powered by <a t-att-href="request.env['website'].sudo().search([])[0].company_website or ''" target="_blank">
<span t-esc="request.env['website'].sudo().search([])[0].company_name or ''"/></a>
</div>
</xpath>
<xpath expr="//div[@class='o_sub_menu_footer']" position="replace">
<div class="o_sub_menu_footer">
Powered by <a t-att-href="request.env['website'].sudo().search([])[0].company_website or ''" target="_blank">
<span t-esc="request.env['website'].sudo().search([])[0].company_name or ''"/></a>
</div>
</xpath>
</template>
<template id="login_layout_im_livechat" inherit_id="im_livechat.support_page">
<xpath expr="//body" position="replace">
<body>
<div class="main" style="opacity: 1;">
<h1 class="channel_name"><t t-esc="channel.name"/></h1>
<div>Website Live Chat Powered by <strong><t t-esc="request.env['website'].sudo().search([])[0].company_name or '"/></strong></div>
</div>
</body>
</xpath>
<xpath expr="//body" position="replace">
<body>
<div class="main" style="opacity: 1;">
<h1 class="channel_name"><t t-esc="channel.name"/></h1>
<div>Website Live Chat Powered by <strong><t t-esc="request.env['website'].sudo().search([])[0].company_name or ''"/></strong></div>
</div>
</body>
</xpath>
</template>
<template id="login_layout" inherit_id="mail.message_user_assigned">
<xpath expr="//p[last()]" position="replace">
<p style="color:#9E588B;">Powered by <a t-att-href="request.env['website'].sudo().search([])[0].company_website or ''">
<t t-esc="request.env['website'].sudo().search([])[0].company_name or ''"/></a>.</p>
</xpath>
</template>
<template id="layout_footer_copyright" inherit_id="website.layout_footer_copyright" name="Footer Copyright">
<xpath expr="//div[@class='container mt16 mb8']" position="replace">
<div class="container mt16 mb8">
<div class="pull-right" t-if="not editable">
Powered by <a class="label label-danger" t-att-href="request.env['website'].sudo().search([])[0].company_website">
<t t-esc="request.env['website'].sudo().search([])[0].company_name"/> </a>.
</div>
<div class="pull-left text-muted">
Copyright &amp;copy; <span t-esc="request.env['website'].sudo().search([])[0].company_name"/>
<template id="layout_footer_copyright" inherit_id="website.layout" name="Footer Copyright">
<xpath expr="//div[@class='container mt16 mb8']" position="replace">
<div class="container mt16 mb8">
<div class="pull-right" t-if="not editable">
Powered by <a class="label label-danger" t-att-href="request.env['website'].sudo().search([])[0].company_website or ''">
<t t-esc="request.env['website'].sudo().search([])[0].company_name or ''"/> </a>.
</div>
<div class="pull-left text-muted">
Copyright &amp;copy; <span t-esc="request.env['website'].sudo().search([])[0].company_name or ''"/>
</div>
</div>
</div>
</xpath>
</xpath>
</template>
<template id="footer_extend" inherit_id="website.footer_custom">
<xpath position="replace" expr="//h2"/>
</template>
@ -133,8 +136,8 @@
<a class="" href="/web/database/manager">Manage Databases</a> |
</t>
<t>
<a t-att-href="request.env['website'].sudo().search([])[0].company_website" target="_blank">Powered by
<span t-esc="request.env['website'].sudo().search([])[0].company_name"/></a>
<a t-att-href="request.env['website'].sudo().search([])[0].company_website or ''" target="_blank">Powered by
<span t-esc="request.env['website'].sudo().search([])[0].company_name or ''"/></a>
</t>
</div>
@ -142,5 +145,4 @@
</div>
</xpath>
</template>
</data>
</openerp>
</odoo>

Loading…
Cancel
Save