Before this rev. one could set the report layout on the company using a hardcoded list (background, clean, standard, etc.). Other modules (typically accounting modules) could add options in this list. The used template was built on the layout key. Now, the layout is a many2one field to a newly created model `report.layout`, which is linked to a view with the layout architecture. This gives more control to customize reports and create a new layout (without creating a python module that extend the layout selection).
25 lines
1.3 KiB
XML
25 lines
1.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<record id="report_layout_background" model="report.layout">
|
|
<field name="view_id" ref="web.external_layout_background"/>
|
|
<field name="image">/web/static/img/preview_background.png</field>
|
|
<field name="pdf">/web/static/pdf/preview_background.pdf</field>
|
|
</record>
|
|
<record id="report_layout_boxed" model="report.layout">
|
|
<field name="view_id" ref="web.external_layout_boxed"/>
|
|
<field name="image">/web/static/img/preview_boxed.png</field>
|
|
<field name="pdf">/web/static/pdf/preview_boxed.pdf</field>
|
|
</record>
|
|
<record id="report_layout_clean" model="report.layout">
|
|
<field name="view_id" ref="web.external_layout_clean"/>
|
|
<field name="image">/web/static/img/preview_clean.png</field>
|
|
<field name="pdf">/web/static/pdf/preview_clean.pdf</field>
|
|
</record>
|
|
<record id="report_layout_standard" model="report.layout">
|
|
<field name="view_id" ref="web.external_layout_standard"/>
|
|
<field name="image">/web/static/img/preview_standard.png</field>
|
|
<field name="pdf">/web/static/pdf/preview_standard.pdf</field>
|
|
</record>
|
|
</data>
|
|
</odoo> |