Skip to content

Commit

Permalink
[IMP] pull backend's css
Browse files Browse the repository at this point in the history
  • Loading branch information
hbrunn committed Jan 20, 2015
1 parent 917fb99 commit ea4878d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
13 changes: 12 additions & 1 deletion website_backend_views/model/ir_qweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,19 @@ def render_tag_website_backend_view(
raise NameError(
'Unknown model "%s" or no model defined' %
options.get('res_model'))
# we do the nested divs only in for the backend's css rules to work
etree.SubElement(
element,
etree.SubElement(
etree.SubElement(
element,
'div',
attrib={
'class': 'openerp',
}),
'div',
attrib={
'class': 'oe_application oe_webclient',
}),
'div',
attrib={
'data-website-backend-view-model': model._name,
Expand Down
5 changes: 5 additions & 0 deletions website_backend_views/view/templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
</xpath>
</template>
<template id="layout" inherit_id="website.layout">
<xpath expr="//t[@t-call-assets='website.assets_frontend' and @t-js='false']" position="after">
<t t-if="website_backend_views_active">
<t t-call-assets="web.assets_backend" t-js="false" />
</t>
</xpath>
<xpath expr="//t[@t-call-assets='web.assets_common' and @t-css='false']" position="after">
<t t-if="website_backend_views_active">
<t t-call-assets="web.assets_backend" t-css="false" />
Expand Down

0 comments on commit ea4878d

Please sign in to comment.