[FIX] Correctly separate website variable between report and website_report layouts

bzr revid: sle@openerp.com-20140321111742-rzkykk00z6fbum8d
This commit is contained in:
Simon Lejeune 2014-03-21 12:17:42 +01:00
parent 57e6e8fd28
commit e06cefb4be
3 changed files with 7 additions and 2 deletions

View File

@ -193,6 +193,7 @@ class Report(osv.Model):
'get_digits': self.get_digits,
'render_doc': render_doc,
'editable': True, # Will active inherit_branding
'res_company': self.pool['res.users'].browse(cr, uid, uid).company_id
})
return view_obj.render(cr, uid, template, values, context=context)

View File

@ -4,9 +4,7 @@
<template id="html_container">
&lt;!DOCTYPE html&gt;
<html t-att-lang="lang and lang.replace('_', '-')"
t-att-data-website-id="website.id if editable else None"
t-att-data-editable="'1' if editable else None"
t-att-data-translatable="'1' if translatable else None"
t-att-data-view-xmlid="xmlid if editable else None"
t-att-data-main-object="repr(main_object) if editable else None">
<head>

View File

@ -2,6 +2,12 @@
<openerp>
<data>
<template id="editor_head" inherit_id="report.html_container" name="Editor" groups="base.group_website_publisher">
<xpath expr="//html" position="attributes">
<attribute name="style">padding-top: 51px;</attribute>
<attribute name="t-att-data-website-id">website.id if editable else None</attribute>
<attribute name="t-att-data-translatable">'1' if translatable else None</attribute>
</xpath>
<xpath expr="//body" position="attributes">
<attribute name="style">padding-top: 51px;</attribute>
</xpath>