Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <data>
- <!--
- # Done by RHT on the 05/06/2024
- # Reviewed by xxx on the xx/05/2024
- # Review:https://pastebin.com/8WWvHa3W
- # Task: https://www.odoo.com/odoo/project.task/project.task/3636752?cids=1
- # Need: Need multiple Logo/header/footer for one company
- -->
- <xpath expr="//img[@t-att-src='image_data_uri(company.logo)']" position="replace">
- <!-- if we are on a model, that is account.move -->
- <t t-if="o and o._name == 'account.move' ">
- <!-- if we want the facto layout -->
- <img t-if="o.x_studio_invoice_type == 'facto'" t-att-src="image_data_uri(o.company_id.x_studio_logo_facto_1)" style="max-height: 45px;" alt="Logo"/>
- <!-- if we want the adpl layout -->
- <img t-if="o.x_studio_invoice_type == 'adpl'" t-att-src="image_data_uri(o.company_id.x_studio_logo_adpl)" style="max-height: 45px;" alt="Logo"/>
- <!-- if we want to keep the standard layout -->
- <img t-if="not o.x_studio_invoice_type" t-att-src="image_data_uri(company.logo)" style="max-height: 45px;" alt="Logo"/>
- </t>
- <t t-else="">
- <img t-if="company.logo" t-att-src="image_data_uri(company.logo)" style="max-height: 45px;" alt="Logo"/>
- </t>
- </xpath>
- <xpath expr="//span[@t-field='company.company_details']" position="replace">
- <!-- if we are on a model, that is account.move -->
- <t t-if="o and o._name == 'account.move' ">
- <!-- if we want the facto layout -->
- <span t-if="o.x_studio_invoice_type == 'facto'" t-field="o.company_id.x_studio_header_facto"/>
- <!-- if we want the adpl layout -->
- <span t-if="o.x_studio_invoice_type == 'adpl'" t-field="o.company_id.x_studio_header_adpl"/>
- <!-- if we want to keep the standard layout -->
- <span t-if="not o.x_studio_invoice_type" t-field="company.company_details"/>
- </t>
- <t t-else="">
- <span t-field="company.company_details">
- <div class="bg-light border-1 rounded h-100 d-flex flex-column align-items-center justify-content-center p-4 w-100 opacity-75 text-muted text-center">
- <strong>Company details block</strong>
- <div>Contains the company details.</div>
- </div>
- </span>
- </t>
- </xpath>
- <xpath expr="//div[@t-field='company.report_footer']" position="replace">
- <!-- if we are on a model, that is account.move -->
- <t t-if="o and o._name == 'account.move' ">
- <!-- if we want the facto layout -->
- <div t-if="o.x_studio_invoice_type == 'facto' " t-field="o.company_id.x_studio_footer_facto"/>
- <!-- if we want the adpl layout -->
- <div t-if="o.x_studio_invoice_type == 'adpl' " t-field="o.company_id.x_studio_footer_adpl"/>
- <!-- if we want to keep the standard layout -->
- <div t-if="not o.x_studio_invoice_type" t-field="company.report_footer"/>
- </t>
- <t t-else="">
- <div t-field="company.report_footer">Company Report Footer</div>
- </t>
- </xpath>
- </data>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement