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 SEA on the 24/06/2024
- # Review:https://pastebin.com/NnPLnjh9
- # 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 sale.order -->
- <t t-if="o and o._name == 'sale.order' ">
- <!-- if we want the alternative layout -->
- <img t-if="not o.x_studio_standard_layout " t-att-src="image_data_uri(o.company_id.x_studio_logo)" class="float-start" alt="Logo"/>
- <!-- if we want to keep the standard layout -->
- <img t-if="o.x_studio_standard_layout" t-att-src="image_data_uri(company.logo)" class="float-start" alt="Logo"/>
- </t>
- <t t-else="">
- <img t-if="company.logo" t-att-src="image_data_uri(company.logo)" class="float-start" alt="Logo"/>
- </t>
- </xpath>
- <xpath expr="//t[@t-esc='company.company_details']" position="replace">
- <!-- if we are on a model, that is sale.order -->
- <t t-if="o and o._name == 'sale.order' ">
- <!-- if we want the alternative layout -->
- <t t-if="not o.x_studio_standard_layout" t-esc="o.company_id.x_studio_header"/>
- <!-- if we want to keep the standard layout -->
- <t t-if="o.x_studio_standard_layout" t-esc="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 sale.order -->
- <t t-if="o and o._name == 'sale.order' ">
- <!-- if we want the alternative layout -->
- <div t-if="not o.x_studio_standard_layout " t-field="o.company_id.x_studio_footer"/>
- <!-- if we want to keep the standard layout -->
- <div t-if="o.x_studio_standard_layout" 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