Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
20
report_footer_html/views/ir_actions_report_view.xml
Normal file
20
report_footer_html/views/ir_actions_report_view.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2025 Moduon Team
|
||||
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). -->
|
||||
<odoo>
|
||||
<record model="ir.ui.view" id="act_report_xml_view">
|
||||
<field name="name">ir.actions.report.footer_html.form</field>
|
||||
<field name="model">ir.actions.report</field>
|
||||
<field name="inherit_id" ref="base.act_report_xml_view" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='advanced']/group" position="inside">
|
||||
<field
|
||||
name="footer_html"
|
||||
widget="html"
|
||||
options='{"safe": True}'
|
||||
invisible="report_type not in ['qweb-pdf', 'qweb-html']"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
119
report_footer_html/views/report_templates.xml
Normal file
119
report_footer_html/views/report_templates.xml
Normal file
@@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2025 Moduon Team
|
||||
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). -->
|
||||
<odoo>
|
||||
<template id="footer_html_template">
|
||||
<div
|
||||
t-if="not is_html_empty(footer_html)"
|
||||
t-out="footer_html"
|
||||
class="mb-2 mt-1 w-100"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template
|
||||
id="external_layout_striped_footer_html"
|
||||
inherit_id="web.external_layout_striped"
|
||||
priority="999"
|
||||
>
|
||||
<xpath expr="//div[@t-field='company.report_footer']" position="before">
|
||||
<t t-call="report_footer_html.footer_html_template" />
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template
|
||||
id="external_layout_boxed_footer_html"
|
||||
inherit_id="web.external_layout_boxed"
|
||||
priority="999"
|
||||
>
|
||||
<xpath
|
||||
expr="//div[@t-attf-class="{{'d-flex' if is_html_empty(company.report_header) else 'row' }} o_footer_content border-top pt-2"]"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute
|
||||
name="t-attf-class"
|
||||
>o_footer_content border-top pt-2 d-block</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//span[@t-field='company.report_footer']" position="before">
|
||||
<t t-call="report_footer_html.footer_html_template" />
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template
|
||||
id="external_layout_bold_footer_html"
|
||||
inherit_id="web.external_layout_bold"
|
||||
priority="999"
|
||||
>
|
||||
<xpath
|
||||
expr="//div[@t-attf-class="{{'d-flex' if is_html_empty(company.report_header) else 'row' }} o_footer_content border-top pt-2"]"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute
|
||||
name="t-attf-class"
|
||||
>o_footer_content border-top pt-2 d-block</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//span[@t-field='company.report_footer']" position="before">
|
||||
<t t-call="report_footer_html.footer_html_template" />
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template
|
||||
id="external_layout_standard_footer_html"
|
||||
inherit_id="web.external_layout_standard"
|
||||
priority="999"
|
||||
>
|
||||
<xpath
|
||||
expr="//div[hasclass('o_footer_content') and hasclass('d-flex')]"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute name="class">o_footer_content border-top pt-2 d-block</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[@t-field='company.report_footer']" position="replace">
|
||||
<div>
|
||||
<t t-call="report_footer_html.footer_html_template" />
|
||||
<span t-field="company.report_footer" />
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template
|
||||
id="external_layout_bubble_footer_html"
|
||||
inherit_id="web.external_layout_bubble"
|
||||
priority="999"
|
||||
>
|
||||
<xpath expr="//div[@t-field='company.report_footer']" position="replace">
|
||||
<div class="border-top pt-2">
|
||||
<t t-call="report_footer_html.footer_html_template" />
|
||||
<div t-field="company.report_footer" />
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template
|
||||
id="external_layout_wave_footer_html"
|
||||
inherit_id="web.external_layout_wave"
|
||||
priority="999"
|
||||
>
|
||||
<xpath expr="//div[@t-field='company.report_footer']" position="before">
|
||||
<t t-call="report_footer_html.footer_html_template" />
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template
|
||||
id="external_layout_folder_footer_html"
|
||||
inherit_id="web.external_layout_folder"
|
||||
priority="999"
|
||||
>
|
||||
<xpath
|
||||
expr="//div[hasclass('o_footer_content') and hasclass('d-flex')]"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute name="class">o_footer_content border-top pt-2 d-block</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[@t-field='company.report_footer']" position="replace">
|
||||
<div>
|
||||
<t t-call="report_footer_html.footer_html_template" />
|
||||
<span t-field="company.report_footer" />
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user