[FIX] account, base, web: fixing report layouts
Reverting some changes introduced in
f29df7fb2e.
By changing the html tag from 'article' to 'page' we were losing the
style on the body of the document. The problem it was supposed to tackle
will be addresed in the future.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<address t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
|
||||
<div t-if="o.partner_id.vat" class="mt16"><t t-esc="o.company_id.country_id.vat_label or 'Tax ID'"/>: <span t-field="o.partner_id.vat"/></div>
|
||||
</t>
|
||||
<div class="page" t-att-data-model="o._name" t-att-data-id="o.id">
|
||||
<div class="page">
|
||||
<h2>
|
||||
<span t-if="o.type == 'out_invoice' and o.state in ('open', 'in_payment', 'paid')">Invoice</span>
|
||||
<span t-if="o.type == 'out_invoice' and o.state == 'draft'">Draft Invoice</span>
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
<div class="clearfix mb8"/>
|
||||
</div>
|
||||
|
||||
<div class="article o_report_layout_background">
|
||||
<div class="article o_report_layout_background" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id">
|
||||
<t t-call="web.address_layout"/>
|
||||
<t t-raw="0"/>
|
||||
</div>
|
||||
@@ -234,7 +234,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="article o_report_layout_boxed">
|
||||
<div class="article o_report_layout_boxed" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id">
|
||||
<t t-call="web.address_layout"/>
|
||||
<t t-raw="0"/>
|
||||
</div>
|
||||
@@ -273,7 +273,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="article o_report_layout_clean">
|
||||
<div class="article o_report_layout_clean" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id">
|
||||
<t t-call="web.address_layout"/>
|
||||
<t t-raw="0"/>
|
||||
</div>
|
||||
@@ -321,7 +321,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="article o_report_layout_standard">
|
||||
<div class="article o_report_layout_standard" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id">
|
||||
<t t-call="web.address_layout"/>
|
||||
<t t-raw="0"/>
|
||||
</div>
|
||||
@@ -402,14 +402,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="article">
|
||||
<div class="article" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id">
|
||||
<t t-raw="0"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="basic_layout">
|
||||
<t t-call="web.html_container">
|
||||
<div class="article">
|
||||
<div class="article" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id">
|
||||
<t t-raw="0"/>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
@@ -314,11 +314,11 @@ class IrActionsReport(models.Model):
|
||||
footer_node.append(node)
|
||||
|
||||
# Retrieve bodies
|
||||
for node in root.xpath(match_klass.format('page')):
|
||||
for node in root.xpath(match_klass.format('article')):
|
||||
body = layout.render(dict(subst=False, body=lxml.html.tostring(node), base_url=base_url))
|
||||
bodies.append(body)
|
||||
if node.get('data-model') == self.model:
|
||||
res_ids.append(int(node.get('data-id', 0)))
|
||||
if node.get('data-oe-model') == self.model:
|
||||
res_ids.append(int(node.get('data-oe-id', 0)))
|
||||
else:
|
||||
res_ids.append(None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user