[IMP] inherit_option_id -> application
This commit is contained in:
parent
e2f41d09ba
commit
e06f5b414b
|
@ -158,22 +158,25 @@ class Website(openerp.addons.web.controllers.main.Home):
|
||||||
@http.route('/website/theme_change', type='http', auth="user", website=True)
|
@http.route('/website/theme_change', type='http', auth="user", website=True)
|
||||||
def theme_change(self, theme_id=False, **kwargs):
|
def theme_change(self, theme_id=False, **kwargs):
|
||||||
imd = request.registry['ir.model.data']
|
imd = request.registry['ir.model.data']
|
||||||
view = request.registry['ir.ui.view']
|
Views = request.registry['ir.ui.view']
|
||||||
|
|
||||||
view_model, view_option_id = imd.get_object_reference(
|
_, theme_template_id = imd.get_object_reference(
|
||||||
request.cr, request.uid, 'website', 'theme')
|
request.cr, request.uid, 'website', 'theme')
|
||||||
views = view.search(
|
views = Views.search(request.cr, request.uid, [
|
||||||
request.cr, request.uid, [('inherit_id', '=', view_option_id)],
|
('inherit_id', '=', theme_template_id),
|
||||||
context=request.context)
|
('application', '=', 'enabled'),
|
||||||
view.write(request.cr, request.uid, views, {'inherit_id': False},
|
], context=request.context)
|
||||||
context=request.context)
|
Views.write(request.cr, request.uid, views, {
|
||||||
|
'application': 'disabled',
|
||||||
|
}, context=request.context)
|
||||||
|
|
||||||
if theme_id:
|
if theme_id:
|
||||||
module, xml_id = theme_id.split('.')
|
module, xml_id = theme_id.split('.')
|
||||||
view_model, view_id = imd.get_object_reference(
|
_, view_id = imd.get_object_reference(
|
||||||
request.cr, request.uid, module, xml_id)
|
request.cr, request.uid, module, xml_id)
|
||||||
view.write(request.cr, request.uid, [view_id],
|
Views.write(request.cr, request.uid, [view_id], {
|
||||||
{'inherit_id': view_option_id}, context=request.context)
|
'application': 'enabled'
|
||||||
|
}, context=request.context)
|
||||||
|
|
||||||
return request.render('website.themes', {'theme_changed': True})
|
return request.render('website.themes', {'theme_changed': True})
|
||||||
|
|
||||||
|
@ -197,20 +200,6 @@ class Website(openerp.addons.web.controllers.main.Home):
|
||||||
module_obj.button_immediate_upgrade(request.cr, request.uid, module_ids, context=request.context)
|
module_obj.button_immediate_upgrade(request.cr, request.uid, module_ids, context=request.context)
|
||||||
return request.redirect(redirect)
|
return request.redirect(redirect)
|
||||||
|
|
||||||
@http.route('/website/customize_template_toggle', type='json', auth='user', website=True)
|
|
||||||
def customize_template_set(self, view_id):
|
|
||||||
view_obj = request.registry.get("ir.ui.view")
|
|
||||||
view = view_obj.browse(request.cr, request.uid, int(view_id),
|
|
||||||
context=request.context)
|
|
||||||
if view.inherit_id:
|
|
||||||
value = False
|
|
||||||
else:
|
|
||||||
value = view.inherit_option_id and view.inherit_option_id.id or False
|
|
||||||
view_obj.write(request.cr, request.uid, [view_id], {
|
|
||||||
'inherit_id': value
|
|
||||||
}, context=request.context)
|
|
||||||
return True
|
|
||||||
|
|
||||||
@http.route('/website/customize_template_get', type='json', auth='user', website=True)
|
@http.route('/website/customize_template_get', type='json', auth='user', website=True)
|
||||||
def customize_template_get(self, xml_id, full=False):
|
def customize_template_get(self, xml_id, full=False):
|
||||||
""" Lists the templates customizing ``xml_id``. By default, only
|
""" Lists the templates customizing ``xml_id``. By default, only
|
||||||
|
@ -221,34 +210,35 @@ class Website(openerp.addons.web.controllers.main.Home):
|
||||||
view_model, view_theme_id = imd.get_object_reference(
|
view_model, view_theme_id = imd.get_object_reference(
|
||||||
request.cr, request.uid, 'website', 'theme')
|
request.cr, request.uid, 'website', 'theme')
|
||||||
|
|
||||||
user = request.registry['res.users'].browse(request.cr, request.uid, request.uid, request.context)
|
user = request.registry['res.users']\
|
||||||
|
.browse(request.cr, request.uid, request.uid, request.context)
|
||||||
user_groups = set(user.groups_id)
|
user_groups = set(user.groups_id)
|
||||||
|
|
||||||
view = request.registry["ir.ui.view"]
|
views = request.registry["ir.ui.view"]\
|
||||||
views = view._views_get(request.cr, request.uid, xml_id, context=request.context)
|
._views_get(request.cr, request.uid, xml_id, context=request.context)
|
||||||
done = set()
|
done = set()
|
||||||
result = []
|
result = []
|
||||||
for v in views:
|
for v in views:
|
||||||
if not user_groups.issuperset(v.groups_id):
|
if not user_groups.issuperset(v.groups_id):
|
||||||
continue
|
continue
|
||||||
if full or v.inherit_option_id and v.inherit_option_id.id != view_theme_id:
|
if full or (v.application != 'always' and v.inherit_id.id != view_theme_id):
|
||||||
if v.inherit_option_id.id not in done:
|
if v.inherit_id not in done:
|
||||||
result.append({
|
result.append({
|
||||||
'name': v.inherit_option_id.name,
|
'name': v.inherit_id.name,
|
||||||
'id': v.id,
|
'id': v.id,
|
||||||
'xml_id': v.xml_id,
|
'xml_id': v.xml_id,
|
||||||
'inherit_id': v.inherit_id.id,
|
'inherit_id': v.inherit_id.id,
|
||||||
'header': True,
|
'header': True,
|
||||||
'active': False
|
'active': False
|
||||||
})
|
})
|
||||||
done.add(v.inherit_option_id.id)
|
done.add(v.inherit_id)
|
||||||
result.append({
|
result.append({
|
||||||
'name': v.name,
|
'name': v.name,
|
||||||
'id': v.id,
|
'id': v.id,
|
||||||
'xml_id': v.xml_id,
|
'xml_id': v.xml_id,
|
||||||
'inherit_id': v.inherit_id.id,
|
'inherit_id': v.inherit_id.id,
|
||||||
'header': False,
|
'header': False,
|
||||||
'active': (v.inherit_id.id == v.inherit_option_id.id) or (full and v.inherit_id.id)
|
'active': v.application in ('always', 'enabled'),
|
||||||
})
|
})
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,6 @@ from openerp.osv import osv, fields
|
||||||
class view(osv.osv):
|
class view(osv.osv):
|
||||||
_inherit = "ir.ui.view"
|
_inherit = "ir.ui.view"
|
||||||
_columns = {
|
_columns = {
|
||||||
'inherit_option_id': fields.many2one('ir.ui.view','Optional Inheritancy'),
|
|
||||||
'inherited_option_ids': fields.one2many('ir.ui.view','inherit_option_id','Optional Inheritancies'),
|
|
||||||
'page': fields.boolean("Whether this view is a web page template (complete)"),
|
'page': fields.boolean("Whether this view is a web page template (complete)"),
|
||||||
'website_meta_title': fields.char("Website meta title", size=70, translate=True),
|
'website_meta_title': fields.char("Website meta title", size=70, translate=True),
|
||||||
'website_meta_description': fields.text("Website meta description", size=160, translate=True),
|
'website_meta_description': fields.text("Website meta description", size=160, translate=True),
|
||||||
|
@ -66,16 +64,18 @@ class view(osv.osv):
|
||||||
if called_view not in result:
|
if called_view not in result:
|
||||||
result += self._views_get(cr, uid, called_view, options=options, context=context)
|
result += self._views_get(cr, uid, called_view, options=options, context=context)
|
||||||
|
|
||||||
extensions = set(view.inherit_children_ids)
|
extensions = view.inherit_children_ids
|
||||||
if options:
|
if not options:
|
||||||
extensions.update(view.inherited_option_ids)
|
# only active children
|
||||||
|
extensions = (v for v in view.inherit_children_ids
|
||||||
|
if v.application in ('always', 'enabled'))
|
||||||
|
|
||||||
# Keep options in a deterministic order regardless of their applicability
|
# Keep options in a deterministic order regardless of their applicability
|
||||||
for extension in sorted(extensions, key=lambda v: v.id):
|
for extension in sorted(extensions, key=lambda v: v.id):
|
||||||
for r in self._views_get(
|
for r in self._views_get(
|
||||||
cr, uid, extension,
|
cr, uid, extension,
|
||||||
# only return optional grandchildren if this child is enabled
|
# only return optional grandchildren if this child is enabled
|
||||||
options=bool(extension.inherit_id),
|
options=extension.application in ('always', 'enabled'),
|
||||||
context=context, root=False):
|
context=context, root=False):
|
||||||
if r not in result:
|
if r not in result:
|
||||||
result.append(r)
|
result.append(r)
|
||||||
|
|
|
@ -470,8 +470,14 @@
|
||||||
});
|
});
|
||||||
menu.on('click', 'a[data-action!=ace]', function (event) {
|
menu.on('click', 'a[data-action!=ace]', function (event) {
|
||||||
var view_id = $(event.currentTarget).data('view-id');
|
var view_id = $(event.currentTarget).data('view-id');
|
||||||
openerp.jsonRpc('/website/customize_template_toggle', 'call', {
|
return openerp.jsonRpc('/web/dataset/call_kw', 'call', {
|
||||||
'view_id': view_id
|
model: 'ir.ui.view',
|
||||||
|
method: 'toggle',
|
||||||
|
args: [],
|
||||||
|
kwargs: {
|
||||||
|
ids: [parseInt(view_id, 10)],
|
||||||
|
context: website.get_context()
|
||||||
|
}
|
||||||
}).then( function() {
|
}).then( function() {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
});
|
});
|
||||||
|
|
|
@ -203,82 +203,82 @@
|
||||||
All Default Themes
|
All Default Themes
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template id="website.theme_amelia" name="Amelia" inherit_option_id="website.theme">
|
<template id="website.theme_amelia" name="Amelia" inherit_id="website.theme" optional="disabled">
|
||||||
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/amelia.min.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/amelia.min.css' t-ignore="true"/>
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/amelia.fix.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/amelia.fix.css' t-ignore="true"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="website.theme_cerulean" name="Cerulean" inherit_option_id="website.theme">
|
<template id="website.theme_cerulean" name="Cerulean" inherit_id="website.theme" optional="disabled">
|
||||||
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/cerulean.min.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/cerulean.min.css' t-ignore="true"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="website.theme_cosmo" name="Cosmo" inherit_option_id="website.theme">
|
<template id="website.theme_cosmo" name="Cosmo" inherit_id="website.theme" optional="disabled">
|
||||||
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/cosmo.min.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/cosmo.min.css' t-ignore="true"/>
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/cosmo.fix.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/cosmo.fix.css' t-ignore="true"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="website.theme_cyborg" name="Cyborg" inherit_option_id="website.theme">
|
<template id="website.theme_cyborg" name="Cyborg" inherit_id="website.theme" optional="disabled">
|
||||||
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/cyborg.min.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/cyborg.min.css' t-ignore="true"/>
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/cyborg.fix.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/cyborg.fix.css' t-ignore="true"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="website.theme_flatly" name="Flatly" inherit_option_id="website.theme">
|
<template id="website.theme_flatly" name="Flatly" inherit_id="website.theme" optional="disabled">
|
||||||
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/flatly.min.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/flatly.min.css' t-ignore="true"/>
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/flatly.fix.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/flatly.fix.css' t-ignore="true"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="website.theme_journal" name="Journal" inherit_option_id="website.theme">
|
<template id="website.theme_journal" name="Journal" inherit_id="website.theme" optional="disabled">
|
||||||
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/journal.min.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/journal.min.css' t-ignore="true"/>
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/journal.fix.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/journal.fix.css' t-ignore="true"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="website.theme_readable" name="Readable" inherit_option_id="website.theme">
|
<template id="website.theme_readable" name="Readable" inherit_id="website.theme" optional="disabled">
|
||||||
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/readable.min.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/readable.min.css' t-ignore="true"/>
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/readable.fix.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/readable.fix.css' t-ignore="true"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="website.theme_simplex" name="Simplex" inherit_option_id="website.theme">
|
<template id="website.theme_simplex" name="Simplex" inherit_id="website.theme" optional="disabled">
|
||||||
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/simplex.min.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/simplex.min.css' t-ignore="true"/>
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/simplex.fix.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/simplex.fix.css' t-ignore="true"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="website.theme_slate" name="Slate" inherit_option_id="website.theme">
|
<template id="website.theme_slate" name="Slate" inherit_id="website.theme" optional="disabled">
|
||||||
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/slate.min.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/slate.min.css' t-ignore="true"/>
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/slate.fix.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/slate.fix.css' t-ignore="true"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="website.theme_spacelab" name="Spacelab" inherit_option_id="website.theme">
|
<template id="website.theme_spacelab" name="Spacelab" inherit_id="website.theme" optional="disabled">
|
||||||
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/spacelab.min.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/spacelab.min.css' t-ignore="true"/>
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/spacelab.fix.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/spacelab.fix.css' t-ignore="true"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="website.theme_united" name="United" inherit_option_id="website.theme">
|
<template id="website.theme_united" name="United" inherit_id="website.theme" optional="disabled">
|
||||||
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/united.min.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/united.min.css' t-ignore="true"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="website.theme_yeti" name="Yeti" inherit_option_id="website.theme">
|
<template id="website.theme_yeti" name="Yeti" inherit_id="website.theme" optional="disabled">
|
||||||
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
<xpath expr="//link[@id='bootstrap_css']" position="replace">
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/yeti.min.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/yeti.min.css' t-ignore="true"/>
|
||||||
<link rel='stylesheet' href='/website/static/src/css/bootswatch/yeti.fix.css' t-ignore="true"/>
|
<link rel='stylesheet' href='/website/static/src/css/bootswatch/yeti.fix.css' t-ignore="true"/>
|
||||||
|
|
|
@ -220,7 +220,7 @@
|
||||||
</html>
|
</html>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="layout_logo_show" inherit_id="website.layout" inherit_option_id="website.layout" name="Show Logo">
|
<template id="layout_logo_show" inherit_id="website.layout" optional="enabled" name="Show Logo">
|
||||||
<xpath expr="//header//a[@class='navbar-brand']" position="replace">
|
<xpath expr="//header//a[@class='navbar-brand']" position="replace">
|
||||||
<a href="/" class="navbar-brand logo">
|
<a href="/" class="navbar-brand logo">
|
||||||
<img src="/logo.png"/>
|
<img src="/logo.png"/>
|
||||||
|
@ -304,7 +304,7 @@
|
||||||
<script type="text/javascript" src="/website/static/src/js/jQuery.transfo.js"></script>
|
<script type="text/javascript" src="/website/static/src/js/jQuery.transfo.js"></script>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="debugger" inherit_option_id="website.layout" name="Debugger & Tests">
|
<template id="debugger" inherit_id="website.layout" optional="disabled" name="Debugger & Tests">
|
||||||
<xpath expr='//t[@name="layout_head"]' position="after">
|
<xpath expr='//t[@name="layout_head"]' position="after">
|
||||||
<script type="text/javascript" src="/website/static/src/js/website.tour.js"></script>
|
<script type="text/javascript" src="/website/static/src/js/website.tour.js"></script>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
@ -318,7 +318,7 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="show_sign_in" inherit_option_id="website.layout" inherit_id="website.layout" name="Show Sign In" groups="base.group_public">
|
<template id="show_sign_in" optional="enabled" inherit_id="website.layout" name="Show Sign In" groups="base.group_public">
|
||||||
<xpath expr="//ul[@id='top_menu']" position="inside">
|
<xpath expr="//ul[@id='top_menu']" position="inside">
|
||||||
<li class="divider"/>
|
<li class="divider"/>
|
||||||
<li>
|
<li>
|
||||||
|
@ -329,7 +329,7 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="footer_custom" inherit_option_id="website.layout" name="Custom Footer">
|
<template id="footer_custom" inherit_id="website.layout" optional="disabled" name="Custom Footer">
|
||||||
<xpath expr="//div[@id='footer_container']" position="before">
|
<xpath expr="//div[@id='footer_container']" position="before">
|
||||||
<div class="oe_structure">
|
<div class="oe_structure">
|
||||||
<section data-snippet-id='three-columns' class="mt16 mb16">
|
<section data-snippet-id='three-columns' class="mt16 mb16">
|
||||||
|
|
|
@ -161,7 +161,7 @@
|
||||||
|
|
||||||
<!-- Option: Blog Post List: show tags -->
|
<!-- Option: Blog Post List: show tags -->
|
||||||
<template id="opt_blog_post_short_tags" name="Tags"
|
<template id="opt_blog_post_short_tags" name="Tags"
|
||||||
inherit_option_id="website_blog.blog_post_short" inherit_id="website_blog.blog_post_short">
|
optional="enabled" inherit_id="website_blog.blog_post_short">
|
||||||
<xpath expr="//div[@name='blog_post_data']" position="inside">
|
<xpath expr="//div[@name='blog_post_data']" position="inside">
|
||||||
<p class="post-meta text-muted text-center" t-if="len(blog_post.tag_ids)">
|
<p class="post-meta text-muted text-center" t-if="len(blog_post.tag_ids)">
|
||||||
<span class="fa fa-tags"/>
|
<span class="fa fa-tags"/>
|
||||||
|
@ -265,7 +265,7 @@
|
||||||
|
|
||||||
<!-- Options: Blog Post: breadcrumb -->
|
<!-- Options: Blog Post: breadcrumb -->
|
||||||
<template id="blog_breadcrumb" name="Breadcrumb"
|
<template id="blog_breadcrumb" name="Breadcrumb"
|
||||||
inherit_option_id="website_blog.blog_post_complete">
|
inherit_id="website_blog.blog_post_complete" optional="disabled">
|
||||||
<xpath expr="//div[@id='title']" position="before">
|
<xpath expr="//div[@id='title']" position="before">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -285,7 +285,7 @@
|
||||||
|
|
||||||
<!-- Options: Blog Post: user can reply -->
|
<!-- Options: Blog Post: user can reply -->
|
||||||
<template id="opt_blog_post_complete_comment" name="Allow blog post comment"
|
<template id="opt_blog_post_complete_comment" name="Allow blog post comment"
|
||||||
inherit_option_id="website_blog.blog_post_complete"
|
inherit_id="website_blog.blog_post_complete" optional="disabled"
|
||||||
groups="website_mail.group_comment">
|
groups="website_mail.group_comment">
|
||||||
<xpath expr="//ul[@id='comments-list']" position="before">
|
<xpath expr="//ul[@id='comments-list']" position="before">
|
||||||
<section class="mb32 read_width css_editable_mode_hidden">
|
<section class="mb32 read_width css_editable_mode_hidden">
|
||||||
|
@ -307,7 +307,7 @@
|
||||||
|
|
||||||
<!-- Options: Blog Post: user can select text for tweet -->
|
<!-- Options: Blog Post: user can select text for tweet -->
|
||||||
<template id="opt_blog_post_select_to_tweet" name="Select to Tweet"
|
<template id="opt_blog_post_select_to_tweet" name="Select to Tweet"
|
||||||
inherit_option_id="website_blog.blog_post_complete">
|
inherit_id="website_blog.blog_post_complete" optional="disabled">
|
||||||
<xpath expr="//div[@id='blog_content']" position="attributes">
|
<xpath expr="//div[@id='blog_content']" position="attributes">
|
||||||
<attribute name="class">js_tweet mt32</attribute>
|
<attribute name="class">js_tweet mt32</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
@ -318,7 +318,7 @@
|
||||||
|
|
||||||
<!-- Options: Blog Post: user can add Inline Discussion -->
|
<!-- Options: Blog Post: user can add Inline Discussion -->
|
||||||
<template id="opt_blog_post_inline_discussion" name="Allow comment in text"
|
<template id="opt_blog_post_inline_discussion" name="Allow comment in text"
|
||||||
inherit_option_id="website_blog.blog_post_complete">
|
inherit_id="website_blog.blog_post_complete" optional="disabled">
|
||||||
<xpath expr="//div[@id='blog_content']" position="attributes">
|
<xpath expr="//div[@id='blog_content']" position="attributes">
|
||||||
<attribute name="enable_chatter_discuss">True</attribute>
|
<attribute name="enable_chatter_discuss">True</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
@ -326,7 +326,7 @@
|
||||||
|
|
||||||
<!-- Options: Blog Post: show tags -->
|
<!-- Options: Blog Post: show tags -->
|
||||||
<template id="opt_blog_post_complete_tags" name="Tags"
|
<template id="opt_blog_post_complete_tags" name="Tags"
|
||||||
inherit_option_id="website_blog.blog_post_complete" inherit_id="website_blog.blog_post_complete">
|
optional="enabled" inherit_id="website_blog.blog_post_complete">
|
||||||
<xpath expr="//p[@name='blog_post_data']" position="after">
|
<xpath expr="//p[@name='blog_post_data']" position="after">
|
||||||
<p class="post-meta text-muted text-center" t-if="len(blog_post.tag_ids)">
|
<p class="post-meta text-muted text-center" t-if="len(blog_post.tag_ids)">
|
||||||
<span class="fa fa-tags"/>
|
<span class="fa fa-tags"/>
|
||||||
|
@ -355,7 +355,7 @@
|
||||||
<!-- Option:Right Column for extra info -->
|
<!-- Option:Right Column for extra info -->
|
||||||
|
|
||||||
<template id="index_right" name="Right Column"
|
<template id="index_right" name="Right Column"
|
||||||
inherit_option_id="website_blog.blog_post_short">
|
inherit_id="website_blog.blog_post_short" optional="disabled">
|
||||||
<xpath expr="//div[@id='main_column']" position="attributes">
|
<xpath expr="//div[@id='main_column']" position="attributes">
|
||||||
<attribute name="class">col-sm-8</attribute>
|
<attribute name="class">col-sm-8</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
@ -366,7 +366,7 @@
|
||||||
|
|
||||||
<!-- Option:Right Column: tags -->
|
<!-- Option:Right Column: tags -->
|
||||||
<template id="opt_blog_rc_tags" name="Tags"
|
<template id="opt_blog_rc_tags" name="Tags"
|
||||||
inherit_option_id="website_blog.index_right">
|
inherit_id="website_blog.index_right" optional="disabled">
|
||||||
<xpath expr="//div[@id='blog_right_column']" position="inside">
|
<xpath expr="//div[@id='blog_right_column']" position="inside">
|
||||||
<section class="mt32">
|
<section class="mt32">
|
||||||
<h4>Tags</h4>
|
<h4>Tags</h4>
|
||||||
|
@ -383,7 +383,7 @@
|
||||||
|
|
||||||
<!-- Option:Right Column: archives -->
|
<!-- Option:Right Column: archives -->
|
||||||
<template id="opt_blog_rc_history" name="Archives"
|
<template id="opt_blog_rc_history" name="Archives"
|
||||||
inherit_option_id="website_blog.index_right">
|
inherit_id="website_blog.index_right" optional="disabled">
|
||||||
<xpath expr="//div[@id='blog_right_column']" position="inside">
|
<xpath expr="//div[@id='blog_right_column']" position="inside">
|
||||||
<section class="mt32">
|
<section class="mt32">
|
||||||
<h4>Archives</h4>
|
<h4>Archives</h4>
|
||||||
|
@ -400,7 +400,7 @@
|
||||||
|
|
||||||
<!-- Option:Right Column: about us -->
|
<!-- Option:Right Column: about us -->
|
||||||
<template id="opt_blog_rc_about_us" name="About Us" priority="2"
|
<template id="opt_blog_rc_about_us" name="About Us" priority="2"
|
||||||
inherit_option_id="website_blog.index_right">
|
inherit_id="website_blog.index_right" optional="disabled">
|
||||||
<xpath expr="//div[@id='blog_right_column']" position="inside">
|
<xpath expr="//div[@id='blog_right_column']" position="inside">
|
||||||
<section class="mt32">
|
<section class="mt32">
|
||||||
<h4>About us</h4>
|
<h4>About us</h4>
|
||||||
|
@ -417,7 +417,7 @@
|
||||||
|
|
||||||
<!-- Option:Right Column: follow us -->
|
<!-- Option:Right Column: follow us -->
|
||||||
<template id="opt_blog_rc_follow_us" name="Follow us" priority="4"
|
<template id="opt_blog_rc_follow_us" name="Follow us" priority="4"
|
||||||
inherit_option_id="website_blog.index_right">
|
inherit_id="website_blog.index_right" optional="disabled">
|
||||||
<xpath expr="//div[@id='blog_right_column']" position="inside">
|
<xpath expr="//div[@id='blog_right_column']" position="inside">
|
||||||
<section class="mt32">
|
<section class="mt32">
|
||||||
<h4>Follow us<small t-if="blog">: <t t-esc="blog.name"/></small></h4>
|
<h4>Follow us<small t-if="blog">: <t t-esc="blog.name"/></small></h4>
|
||||||
|
@ -444,7 +444,7 @@
|
||||||
|
|
||||||
<!-- Option:Right Column: blogs -->
|
<!-- Option:Right Column: blogs -->
|
||||||
<template id="opt_blog_rc_blogs" name="Our Blogs" priority="6"
|
<template id="opt_blog_rc_blogs" name="Our Blogs" priority="6"
|
||||||
inherit_option_id="website_blog.index_right">
|
inherit_id="website_blog.index_right" optional="disabled">
|
||||||
<xpath expr="//div[@id='blog_right_column']" position="inside">
|
<xpath expr="//div[@id='blog_right_column']" position="inside">
|
||||||
<section class="mt32 mb32">
|
<section class="mt32 mb32">
|
||||||
<h4>Our Blogs</h4>
|
<h4>Our Blogs</h4>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
<template id="contactus_form" name="Contact Form" inherit_id="website.contactus" inherit_option_id="website.contactus">
|
<template id="contactus_form" name="Contact Form" inherit_id="website.contactus" optional="enabled">
|
||||||
<xpath expr="//div[@name='mail_button']" position="replace">
|
<xpath expr="//div[@name='mail_button']" position="replace">
|
||||||
<form action="/crm/contactus" method="post" class="form-horizontal mt32" enctype="multipart/form-data">
|
<form action="/crm/contactus" method="post" class="form-horizontal mt32" enctype="multipart/form-data">
|
||||||
<t t-foreach="kwargs" t-as="kwarg">
|
<t t-foreach="kwargs" t-as="kwarg">
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="contactus_form_company_name" name="Company Name" inherit_id="website_crm.contactus_form" inherit_option_id="website_crm.contactus_form">
|
<template id="contactus_form_company_name" name="Company Name" inherit_id="website_crm.contactus_form" optional="enabled">
|
||||||
<xpath expr="//div[@name='email_from_container']" position="after">
|
<xpath expr="//div[@name='email_from_container']" position="after">
|
||||||
<div t-attf-class="form-group #{error and 'partner_name' in error and 'has-error' or ''}">
|
<div t-attf-class="form-group #{error and 'partner_name' in error and 'has-error' or ''}">
|
||||||
<label class="col-md-3 col-sm-4 control-label" for="partner_name">Your Company</label>
|
<label class="col-md-3 col-sm-4 control-label" for="partner_name">Your Company</label>
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
</t>
|
</t>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="ref_country" inherit_id="website_crm_partner_assign.index" inherit_option_id="website_crm_partner_assign.index" name="Left World Map">
|
<template id="ref_country" inherit_id="website_crm_partner_assign.index" optional="enabled" name="Left World Map">
|
||||||
<xpath expr="//ul[@id='reseller_countries']" position="after">
|
<xpath expr="//ul[@id='reseller_countries']" position="after">
|
||||||
<h3>World Map</h3>
|
<h3>World Map</h3>
|
||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- Option: left column: World Map -->
|
<!-- Option: left column: World Map -->
|
||||||
<template id="opt_country" inherit_option_id="website_customer.index" name="Show Map">
|
<template id="opt_country" inherit_id="website_customer.index" optional="disabled" name="Show Map">
|
||||||
<xpath expr="//div[@id='ref_left_column']" position="inside">
|
<xpath expr="//div[@id='ref_left_column']" position="inside">
|
||||||
|
|
||||||
<iframe t-attf-src="/google_map/?partner_ids=#{ google_map_partner_ids }&partner_url=/customers/&output=embed"
|
<iframe t-attf-src="/google_map/?partner_ids=#{ google_map_partner_ids }&partner_url=/customers/&output=embed"
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="opt_country_list" inherit_id="website_customer.index" inherit_option_id="website_customer.index" name="Filter on Countries">
|
<template id="opt_country_list" inherit_id="website_customer.index" optional="enabled" name="Filter on Countries">
|
||||||
<xpath expr="//div[@id='ref_left_column']" position="inside">
|
<xpath expr="//div[@id='ref_left_column']" position="inside">
|
||||||
<h3>References by Country</h3>
|
<h3>References by Country</h3>
|
||||||
<ul class="nav nav-pills nav-stacked mt16 mb32">
|
<ul class="nav nav-pills nav-stacked mt16 mb32">
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
</t>
|
</t>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="event_right_photos" inherit_option_id="website_event.index" name="Photos">
|
<template id="event_right_photos" inherit_id="website_event.index" optional="disabled" name="Photos">
|
||||||
<xpath expr="//div[@id='right_column']" position="inside">
|
<xpath expr="//div[@id='right_column']" position="inside">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12 mb16">
|
<div class="col-md-12 mb16">
|
||||||
|
@ -106,7 +106,7 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="event_right_quotes" inherit_option_id="website_event.index" name="Quotes">
|
<template id="event_right_quotes" inherit_id="website_event.index" optional="disabled" name="Quotes">
|
||||||
<xpath expr="//div[@id='right_column']" position="inside">
|
<xpath expr="//div[@id='right_column']" position="inside">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12 mb16">
|
<div class="col-md-12 mb16">
|
||||||
|
@ -123,7 +123,7 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="event_right_country_event" inherit_option_id="website_event.index" name="Country Events">
|
<template id="event_right_country_event" inherit_id="website_event.index" optional="disabled" name="Country Events">
|
||||||
<xpath expr="//div[@id='right_column']" position="inside">
|
<xpath expr="//div[@id='right_column']" position="inside">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12 mb16 mt16 country_events">
|
<div class="col-md-12 mb16 mt16 country_events">
|
||||||
|
@ -140,7 +140,7 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="event_left_column" inherit_option_id="website_event.index" inherit_id="website_event.index" name="Filters">
|
<template id="event_left_column" optional="enabled" inherit_id="website_event.index" name="Filters">
|
||||||
<xpath expr="//div[@id='middle_column']" position="attributes">
|
<xpath expr="//div[@id='middle_column']" position="attributes">
|
||||||
<attribute name="class">col-md-6</attribute>
|
<attribute name="class">col-md-6</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
@ -159,7 +159,7 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="event_category" inherit_option_id="website_event.event_left_column" name="Filter by Category">
|
<template id="event_category" inherit_id="website_event.event_left_column" optional="disabled" name="Filter by Category">
|
||||||
<xpath expr="//div[@id='left_column']" position="inside">
|
<xpath expr="//div[@id='left_column']" position="inside">
|
||||||
<ul class="nav nav-pills nav-stacked mt32">
|
<ul class="nav nav-pills nav-stacked mt32">
|
||||||
<t t-foreach="types">
|
<t t-foreach="types">
|
||||||
|
@ -173,7 +173,7 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="event_location" inherit_option_id="website_event.event_left_column" name="Filter by Country">
|
<template id="event_location" inherit_id="website_event.event_left_column" optional="disabled" name="Filter by Country">
|
||||||
<xpath expr="//div[@id='left_column']" position="inside">
|
<xpath expr="//div[@id='left_column']" position="inside">
|
||||||
<ul class="nav nav-pills nav-stacked mt32">
|
<ul class="nav nav-pills nav-stacked mt32">
|
||||||
<t t-foreach="countries">
|
<t t-foreach="countries">
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="event_description_full" inherit_id="website_event.event_description_full" inherit_option_id="website_event.event_description_full" name="Event's Ticket form">
|
<template id="event_description_full" inherit_id="website_event.event_description_full" optional="enabled" name="Event's Ticket form">
|
||||||
<xpath expr="//div[@t-field='event.description']" position="before">
|
<xpath expr="//div[@t-field='event.description']" position="before">
|
||||||
<form t-attf-action="/event/cart/update?event_id=#{ event.id }" method="post" t-if="event.event_ticket_ids">
|
<form t-attf-action="/event/cart/update?event_id=#{ event.id }" method="post" t-if="event.event_ticket_ids">
|
||||||
<table itemprop="offers" class="table table-striped">
|
<table itemprop="offers" class="table table-striped">
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
<template name="Sponsors" id="event_sponsor" inherit_option_id="website_event.layout" inherit_id="website_event.layout">
|
<template name="Sponsors" id="event_sponsor" optional="enabled" inherit_id="website_event.layout">
|
||||||
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
<xpath expr="//t[@t-call='website.layout']" position="inside">
|
||||||
<t t-set="head">
|
<t t-set="head">
|
||||||
<link rel='stylesheet' href='/website_event_track/static/src/css/website_event_track.css'/>
|
<link rel='stylesheet' href='/website_event_track/static/src/css/website_event_track.css'/>
|
||||||
|
@ -157,7 +157,7 @@
|
||||||
</t>
|
</t>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="tracks_filter" inherit_id="website_event_track.tracks" inherit_option_id="website_event_track.tracks" name="Filter on Tags">
|
<template id="tracks_filter" inherit_id="website_event_track.tracks" optional="enabled" name="Filter on Tags">
|
||||||
<xpath expr="//div[@id='left_column']" position="inside">
|
<xpath expr="//div[@id='left_column']" position="inside">
|
||||||
<ul class="nav nav-pills nav-stacked">
|
<ul class="nav nav-pills nav-stacked">
|
||||||
<li t-att-class="'' if searches.get('tag') else 'active'"><a t-attf-href="/event/#{ slug(event) }/track">All Tags</a></li>
|
<li t-att-class="'' if searches.get('tag') else 'active'"><a t-attf-href="/event/#{ slug(event) }/track">All Tags</a></li>
|
||||||
|
@ -246,7 +246,7 @@
|
||||||
</t>
|
</t>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="event_track_social" name="Social Widgets" inherit_option_id="website_event_track.track_view">
|
<template id="event_track_social" name="Social Widgets" inherit_id="website_event_track.track_view" optional="disabled">
|
||||||
<xpath expr="//div[@id='right_column']" position="inside">
|
<xpath expr="//div[@id='right_column']" position="inside">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<data>
|
<data>
|
||||||
<!-- Page -->
|
<!-- Page -->
|
||||||
|
|
||||||
<template id="aboutus" inherit_id="website.aboutus" inherit_option_id="website.aboutus" name="Our Team">
|
<template id="aboutus" inherit_id="website.aboutus" optional="enabled" name="Our Team">
|
||||||
<xpath expr="//div[@class='oe_structure']" position="after">
|
<xpath expr="//div[@class='oe_structure']" position="after">
|
||||||
<section class="container">
|
<section class="container">
|
||||||
<div class="col-sm-12 text-center" t-if="len(employee_ids)">
|
<div class="col-sm-12 text-center" t-if="len(employee_ids)">
|
||||||
|
|
|
@ -230,7 +230,7 @@
|
||||||
</t>
|
</t>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="job_departments" inherit_option_id="website_hr_recruitment.index" name="Filter by Departments">
|
<template id="job_departments" inherit_id="website_hr_recruitment.index" optional="disabled" name="Filter by Departments">
|
||||||
<xpath expr="//div[@id='jobs_grid_left']" position="inside">
|
<xpath expr="//div[@id='jobs_grid_left']" position="inside">
|
||||||
<ul class="nav nav-pills nav-stacked mb32">
|
<ul class="nav nav-pills nav-stacked mb32">
|
||||||
<li t-att-class=" '' if department_id else 'active' "><a href="/jobs">All Departments</a></li>
|
<li t-att-class=" '' if department_id else 'active' "><a href="/jobs">All Departments</a></li>
|
||||||
|
@ -249,7 +249,7 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="job_offices" inherit_option_id="website_hr_recruitment.index" name="Filter by Offices">
|
<template id="job_offices" inherit_id="website_hr_recruitment.index" optional="disabled" name="Filter by Offices">
|
||||||
<xpath expr="//div[@id='jobs_grid_left']" position="inside">
|
<xpath expr="//div[@id='jobs_grid_left']" position="inside">
|
||||||
<ul class="nav nav-pills nav-stacked mb32">
|
<ul class="nav nav-pills nav-stacked mb32">
|
||||||
<li t-att-class=" '' if office_id else 'active' "><a href="/jobs">All Offices</a></li>
|
<li t-att-class=" '' if office_id else 'active' "><a href="/jobs">All Offices</a></li>
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="opt_index_country" name="Location"
|
<template id="opt_index_country" name="Location"
|
||||||
inherit_option_id="website_membership.index" inherit_id="website_membership.index">
|
optional="enabled" inherit_id="website_membership.index">
|
||||||
<xpath expr="//div[@id='left_column']/ul[last()]" position="after">
|
<xpath expr="//div[@id='left_column']/ul[last()]" position="after">
|
||||||
<ul class="nav nav-pills nav-stacked mt16">
|
<ul class="nav nav-pills nav-stacked mt16">
|
||||||
<li class="nav-header"><h3>Location</h3></li>
|
<li class="nav-header"><h3>Location</h3></li>
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
|
|
||||||
<!-- Option: index: Left Google Map -->
|
<!-- Option: index: Left Google Map -->
|
||||||
<template id="opt_index_google_map" name="Left World Map"
|
<template id="opt_index_google_map" name="Left World Map"
|
||||||
inherit_option_id="website_membership.index" inherit_id="website_membership.index">
|
optional="enabled" inherit_id="website_membership.index">
|
||||||
<xpath expr="//div[@id='left_column']/ul[1]" position="before">
|
<xpath expr="//div[@id='left_column']/ul[1]" position="before">
|
||||||
<ul class="nav nav-pills nav-stacked mt16">
|
<ul class="nav nav-pills nav-stacked mt16">
|
||||||
<li class="nav-header"><h3>World Map</h3></li>
|
<li class="nav-header"><h3>World Map</h3></li>
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="change_quantity" inherit_option_id="website_quote.pricing" name="Change Quantity">
|
<template id="change_quantity" inherit_id="website_quote.pricing" optional="disabled" name="Change Quantity">
|
||||||
<xpath expr="//div[@id='quote_qty']" position="replace">
|
<xpath expr="//div[@id='quote_qty']" position="replace">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon hidden-print">
|
<span class="input-group-addon hidden-print">
|
||||||
|
@ -130,7 +130,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- Options:Quotation Chatter: user can reply -->
|
<!-- Options:Quotation Chatter: user can reply -->
|
||||||
<template id="opt_quotation_chatter_post_complete_comment" name="Allow Comments" inherit_option_id="website_quote.chatter" inherit_id="website_quote.chatter">
|
<template id="opt_quotation_chatter_post_complete_comment" name="Allow Comments" optional="enabled" inherit_id="website_quote.chatter">
|
||||||
<xpath expr="//h1" position="after">
|
<xpath expr="//h1" position="after">
|
||||||
<section class="mb32 css_editable_mode_hidden hidden-print">
|
<section class="mb32 css_editable_mode_hidden hidden-print">
|
||||||
<form id="comment" t-attf-action="/quote/#{quotation.id}/#{quotation.access_token}/post" method="POST">
|
<form id="comment" t-attf-action="/quote/#{quotation.id}/#{quotation.access_token}/post" method="POST">
|
||||||
|
@ -388,7 +388,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- Options:Quotation Signature -->
|
<!-- Options:Quotation Signature -->
|
||||||
<template id="opt_quotation_signature" name="Ask Signature" inherit_option_id="website_quote.so_quotation" inherit_id="website_quote.so_quotation">
|
<template id="opt_quotation_signature" name="Ask Signature" optional="enabled" inherit_id="website_quote.so_quotation">
|
||||||
<xpath expr="//div[@id='sign-dialog']" position="inside">
|
<xpath expr="//div[@id='sign-dialog']" position="inside">
|
||||||
<div class="panel panel-default mt16 mb0" id="drawsign">
|
<div class="panel panel-default mt16 mb0" id="drawsign">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="products_description" inherit_option_id="website_sale.products_item" name="Product Description">
|
<template id="products_description" inherit_id="website_sale.products_item" optional="disabled" name="Product Description">
|
||||||
<xpath expr="//div[@class='product_price']" position="before">
|
<xpath expr="//div[@class='product_price']" position="before">
|
||||||
<div class="text-info oe_subdescription" contenteditable="false">
|
<div class="text-info oe_subdescription" contenteditable="false">
|
||||||
<div itemprop="description" t-field="product.description_sale"></div>
|
<div itemprop="description" t-field="product.description_sale"></div>
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="products_add_to_cart" inherit_option_id="website_sale.products_item" name="Add to Cart">
|
<template id="products_add_to_cart" inherit_id="website_sale.products_item" optional="disabled" name="Add to Cart">
|
||||||
<xpath expr="//div[@class='product_price']" position="inside">
|
<xpath expr="//div[@class='product_price']" position="inside">
|
||||||
<form action="/shop/cart/update" method="post" style="display: inline-block;">
|
<form action="/shop/cart/update" method="post" style="display: inline-block;">
|
||||||
<input name="product_id" t-att-value="product.product_variant_ids[0].id" type="hidden"/>
|
<input name="product_id" t-att-value="product.product_variant_ids[0].id" type="hidden"/>
|
||||||
|
@ -246,7 +246,7 @@
|
||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="products_categories" inherit_option_id="website_sale.products" name="Product Categories">
|
<template id="products_categories" inherit_id="website_sale.products" optional="disabled" name="Product Categories">
|
||||||
<xpath expr="//div[@id='products_grid_before']" position="inside">
|
<xpath expr="//div[@id='products_grid_before']" position="inside">
|
||||||
<ul class="nav nav-pills nav-stacked mt16">
|
<ul class="nav nav-pills nav-stacked mt16">
|
||||||
<li t-att-class=" '' if category else 'active' "><a t-att-href="keep('/shop',category=0)">All Products</a></li>
|
<li t-att-class=" '' if category else 'active' "><a t-att-href="keep('/shop',category=0)">All Products</a></li>
|
||||||
|
@ -263,7 +263,7 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="products_attributes" inherit_option_id="website_sale.products" name="Product Attribute's Filters" groups="product.group_product_attributes">
|
<template id="products_attributes" inherit_id="website_sale.products" optional="disabled" name="Product Attribute's Filters" groups="product.group_product_attributes">
|
||||||
<xpath expr="//div[@id='products_grid_before']" position="inside">
|
<xpath expr="//div[@id='products_grid_before']" position="inside">
|
||||||
<form t-att-action="keep('shop',attrib=0)" class="attributes" method="get">
|
<form t-att-action="keep('shop',attrib=0)" class="attributes" method="get">
|
||||||
<ul class="nav nav-pills nav-stacked mt16">
|
<ul class="nav nav-pills nav-stacked mt16">
|
||||||
|
@ -293,7 +293,7 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="products_list_view" inherit_option_id="website_sale.products" name="List View">
|
<template id="products_list_view" inherit_id="website_sale.products" optional="disabled" name="List View">
|
||||||
<xpath expr="//div[@id='products_grid']//table" position="replace">
|
<xpath expr="//div[@id='products_grid']//table" position="replace">
|
||||||
<t t-foreach="products" t-as="product">
|
<t t-foreach="products" t-as="product">
|
||||||
<div class="oe_product oe_list oe_product_cart" t-att-data-publish="product.website_published and 'on' or 'off'">
|
<div class="oe_product oe_list oe_product_cart" t-att-data-publish="product.website_published and 'on' or 'off'">
|
||||||
|
@ -389,7 +389,7 @@
|
||||||
</t>
|
</t>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="recommended_products" inherit_id="website_sale.product" inherit_option_id="website_sale.product" name="Alternative Products">
|
<template id="recommended_products" inherit_id="website_sale.product" optional="enabled" name="Alternative Products">
|
||||||
<xpath expr="//div[@id='product_full_description']" position="after">
|
<xpath expr="//div[@id='product_full_description']" position="after">
|
||||||
<div class="container mt32" t-if="product.alternative_product_ids">
|
<div class="container mt32" t-if="product.alternative_product_ids">
|
||||||
<h3>Suggested alternatives:</h3>
|
<h3>Suggested alternatives:</h3>
|
||||||
|
@ -411,7 +411,7 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="product_attributes" inherit_id="website_sale.product" inherit_option_id="website_sale.product" name="Product attributes" groups="product.group_product_attributes">
|
<template id="product_attributes" inherit_id="website_sale.product" optional="enabled" name="Product attributes" groups="product.group_product_attributes">
|
||||||
<xpath expr="//p[@t-field='product.description_sale']" position="after">
|
<xpath expr="//p[@t-field='product.description_sale']" position="after">
|
||||||
<hr t-if="product.attribute_lines"/>
|
<hr t-if="product.attribute_lines"/>
|
||||||
<p class="text-muted">
|
<p class="text-muted">
|
||||||
|
@ -422,7 +422,7 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="product_comment" inherit_option_id="website_sale.product" name="Discussion">
|
<template id="product_comment" inherit_id="website_sale.product" optional="disabled" name="Discussion">
|
||||||
<xpath expr="//div[@t-field='product.website_description']" position="after">
|
<xpath expr="//div[@t-field='product.website_description']" position="after">
|
||||||
<hr class="mb32"/>
|
<hr class="mb32"/>
|
||||||
<section class="container">
|
<section class="container">
|
||||||
|
@ -588,7 +588,7 @@
|
||||||
</t>
|
</t>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="suggested_products_list" inherit_id="website_sale.cart" inherit_option_id="website_sale.cart" name="Suggested Products in my cart">
|
<template id="suggested_products_list" inherit_id="website_sale.cart" optional="enabled" name="Suggested Products in my cart">
|
||||||
<xpath expr="//table[@id='cart_products']" position="after">
|
<xpath expr="//table[@id='cart_products']" position="after">
|
||||||
<table t-if="suggested_products" class='table table-striped table-condensed'>
|
<table t-if="suggested_products" class='table table-striped table-condensed'>
|
||||||
<colgroup>
|
<colgroup>
|
||||||
|
@ -644,13 +644,13 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="continue_shopping" inherit_id="website_sale.cart" inherit_option_id="website_sale.cart" name="Continue Shopping Button">
|
<template id="continue_shopping" inherit_id="website_sale.cart" optional="enabled" name="Continue Shopping Button">
|
||||||
<xpath expr="//a[@href='/shop/checkout']" position="before">
|
<xpath expr="//a[@href='/shop/checkout']" position="before">
|
||||||
<a href="/shop" class="btn btn-default mb32"><span class="fa fa-long-arrow-left"/> Continue Shopping</a>
|
<a href="/shop" class="btn btn-default mb32"><span class="fa fa-long-arrow-left"/> Continue Shopping</a>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id="reduction_code" inherit_option_id="website_sale.cart" name="Reduction Code">
|
<template id="reduction_code" inherit_id="website_sale.cart" optional="disabled" name="Reduction Code">
|
||||||
<xpath expr="//div[@id='right_column']" position="inside">
|
<xpath expr="//div[@id='right_column']" position="inside">
|
||||||
<h4>Coupon Code</h4>
|
<h4>Coupon Code</h4>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -273,6 +273,21 @@ class view(osv.osv):
|
||||||
context)
|
context)
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
def toggle(self, cr, uid, ids, context=None):
|
||||||
|
""" Switches between enabled and disabled application statuses
|
||||||
|
"""
|
||||||
|
for view in self.browse(cr, uid, ids, context=context):
|
||||||
|
if view.application == 'enabled':
|
||||||
|
view.write({'application': 'disabled'})
|
||||||
|
elif view.application == 'disabled':
|
||||||
|
view.write({'application': 'enabled'})
|
||||||
|
else:
|
||||||
|
raise ValueError(_("Can't toggle view %d with application %r") % (
|
||||||
|
view.id,
|
||||||
|
view.application,
|
||||||
|
))
|
||||||
|
|
||||||
|
|
||||||
def copy(self, cr, uid, id, default=None, context=None):
|
def copy(self, cr, uid, id, default=None, context=None):
|
||||||
if not default:
|
if not default:
|
||||||
default = {}
|
default = {}
|
||||||
|
|
|
@ -218,8 +218,15 @@
|
||||||
<rng:choice>
|
<rng:choice>
|
||||||
<rng:group>
|
<rng:group>
|
||||||
<rng:optional><rng:attribute name="inherit_id"/></rng:optional>
|
<rng:optional><rng:attribute name="inherit_id"/></rng:optional>
|
||||||
<rng:optional><rng:attribute name="inherit_option_id"/></rng:optional>
|
|
||||||
<rng:optional><rng:attribute name="groups"/></rng:optional>
|
<rng:optional><rng:attribute name="groups"/></rng:optional>
|
||||||
|
<rng:optional>
|
||||||
|
<rng:attribute name="optional">
|
||||||
|
<rng:choice>
|
||||||
|
<rng:value>enabled</rng:value>
|
||||||
|
<rng:value>disabled</rng:value>
|
||||||
|
</rng:choice>
|
||||||
|
</rng:attribute>
|
||||||
|
</rng:optional>
|
||||||
</rng:group>
|
</rng:group>
|
||||||
<rng:optional>
|
<rng:optional>
|
||||||
<rng:attribute name="page"><rng:value>True</rng:value></rng:attribute>
|
<rng:attribute name="page"><rng:value>True</rng:value></rng:attribute>
|
||||||
|
|
|
@ -866,7 +866,7 @@ form: module.record_id""" % (xml_id,)
|
||||||
if '.' not in full_tpl_id:
|
if '.' not in full_tpl_id:
|
||||||
full_tpl_id = '%s.%s' % (self.module, tpl_id)
|
full_tpl_id = '%s.%s' % (self.module, tpl_id)
|
||||||
# set the full template name for qweb <module>.<id>
|
# set the full template name for qweb <module>.<id>
|
||||||
if not (el.get('inherit_id') or el.get('inherit_option_id')):
|
if not el.get('inherit_id'):
|
||||||
el.set('t-name', full_tpl_id)
|
el.set('t-name', full_tpl_id)
|
||||||
el.tag = 't'
|
el.tag = 't'
|
||||||
else:
|
else:
|
||||||
|
@ -889,9 +889,8 @@ form: module.record_id""" % (xml_id,)
|
||||||
record.append(Field("qweb", name='type'))
|
record.append(Field("qweb", name='type'))
|
||||||
record.append(Field(el.get('priority', "16"), name='priority'))
|
record.append(Field(el.get('priority', "16"), name='priority'))
|
||||||
record.append(Field(el, name="arch", type="xml"))
|
record.append(Field(el, name="arch", type="xml"))
|
||||||
for field_name in ('inherit_id','inherit_option_id'):
|
if 'inherit_id' in el.attrib:
|
||||||
value = el.attrib.pop(field_name, None)
|
record.append(Field(name='inherit_id', ref=el.get('inherit_id')))
|
||||||
if value: record.append(Field(name=field_name, ref=value))
|
|
||||||
groups = el.attrib.pop('groups', None)
|
groups = el.attrib.pop('groups', None)
|
||||||
if groups:
|
if groups:
|
||||||
grp_lst = map(lambda x: "ref('%s')" % x, groups.split(','))
|
grp_lst = map(lambda x: "ref('%s')" % x, groups.split(','))
|
||||||
|
@ -900,6 +899,8 @@ form: module.record_id""" % (xml_id,)
|
||||||
record.append(Field(name="page", eval="True"))
|
record.append(Field(name="page", eval="True"))
|
||||||
if el.get('primary') == 'True':
|
if el.get('primary') == 'True':
|
||||||
record.append(Field('primary', name='mode'))
|
record.append(Field('primary', name='mode'))
|
||||||
|
if el.get('optional'):
|
||||||
|
record.append(Field(el.get('optional'), name='application'))
|
||||||
|
|
||||||
return self._tag_record(cr, record, data_node)
|
return self._tag_record(cr, record, data_node)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue