Stefan Rijnhart
8 years ago
committed by
Pedro M. Baeza
7 changed files with 48 additions and 63 deletions
-
7report_qweb_pdf_watermark/README.rst
-
2report_qweb_pdf_watermark/__manifest__.py
-
52report_qweb_pdf_watermark/demo/report.xml
-
2report_qweb_pdf_watermark/models/ir_actions_report_xml.py
-
19report_qweb_pdf_watermark/models/report.py
-
5report_qweb_pdf_watermark/tests/test_report_qweb_pdf_watermark.py
-
24report_qweb_pdf_watermark/views/ir_actions_report_xml.xml
@ -1,30 +1,28 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
<?xml version="1.0" encoding="UTF-8"?> |
||||
<openerp> |
|
||||
<data> |
|
||||
<report |
|
||||
id="demo_report" |
|
||||
string="Demo report" |
|
||||
model="res.users" |
|
||||
report_type="qweb-pdf" |
|
||||
name="report_qweb_pdf_watermark.demo_report_view" |
|
||||
file="report_qweb_pdf_watermark.demo_report_view" |
|
||||
paperformat="report.paperformat_euro" |
|
||||
|
<odoo> |
||||
|
<report |
||||
|
id="demo_report" |
||||
|
string="Demo report" |
||||
|
model="res.users" |
||||
|
report_type="qweb-pdf" |
||||
|
name="report_qweb_pdf_watermark.demo_report_view" |
||||
|
file="report_qweb_pdf_watermark.demo_report_view" |
||||
|
paperformat="report.paperformat_euro" |
||||
/> |
/> |
||||
<record id="demo_report" model="ir.actions.report.xml"> |
|
||||
<field name="pdf_watermark_expression">docs[:1].company_id.logo</field> |
|
||||
</record> |
|
||||
<template id="demo_report_view"> |
|
||||
<t t-call="report.html_container"> |
|
||||
<t t-call="report.external_layout"> |
|
||||
<div class="page"> |
|
||||
<ul> |
|
||||
<li t-foreach="docs" t-as="doc"> |
|
||||
<t t-esc="doc.name" /> |
|
||||
</li> |
|
||||
</ul> |
|
||||
</div> |
|
||||
</t> |
|
||||
|
<record id="demo_report" model="ir.actions.report.xml"> |
||||
|
<field name="pdf_watermark_expression">docs[:1].company_id.logo</field> |
||||
|
</record> |
||||
|
<template id="demo_report_view"> |
||||
|
<t t-call="report.html_container"> |
||||
|
<t t-call="report.external_layout"> |
||||
|
<div class="page"> |
||||
|
<ul> |
||||
|
<li t-foreach="docs" t-as="doc"> |
||||
|
<t t-esc="doc.name" /> |
||||
|
</li> |
||||
|
</ul> |
||||
|
</div> |
||||
</t> |
</t> |
||||
</template> |
|
||||
</data> |
|
||||
</openerp> |
|
||||
|
</t> |
||||
|
</template> |
||||
|
</odoo> |
@ -1,15 +1,13 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
<?xml version="1.0" encoding="UTF-8"?> |
||||
<openerp> |
|
||||
<data> |
|
||||
<record id="act_report_xml_view" model="ir.ui.view"> |
|
||||
<field name="model">ir.actions.report.xml</field> |
|
||||
<field name="inherit_id" ref="base.act_report_xml_view" /> |
|
||||
<field name="arch" type="xml"> |
|
||||
<field name="attachment" position="after"> |
|
||||
<field name="pdf_watermark" attrs="{'invisible': [('report_type', '!=', 'qweb-pdf')]}" /> |
|
||||
<field name="pdf_watermark_expression" attrs="{'invisible': [('report_type', '!=', 'qweb-pdf')]}" groups="base.group_no_one" /> |
|
||||
</field> |
|
||||
|
<odoo> |
||||
|
<record id="act_report_xml_view" model="ir.ui.view"> |
||||
|
<field name="model">ir.actions.report.xml</field> |
||||
|
<field name="inherit_id" ref="base.act_report_xml_view" /> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="attachment" position="after"> |
||||
|
<field name="pdf_watermark" attrs="{'invisible': [('report_type', '!=', 'qweb-pdf')]}" /> |
||||
|
<field name="pdf_watermark_expression" attrs="{'invisible': [('report_type', '!=', 'qweb-pdf')]}" groups="base.group_no_one" /> |
||||
</field> |
</field> |
||||
</record> |
|
||||
</data> |
|
||||
</openerp> |
|
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue