Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <data>
- <!--
- # Done by RHT on the 22/04/2024
- # Reviewed by SEA on the xx/xx/2024
- # Review:
- # Task: https://www.odoo.com/web#id=3879961&cids=1&menu_id=4720&action=333&active_id=5686&model=project.task&view_type=form
- # Need: Have a different logo, header and footer for all documents if needed
- -->
- <xpath expr="//img[@t-att-src='image_data_uri(company.logo)']" position="replace">
- <!-- if we are on a model, that we have company logo and that we want to keep the standard layout -->
- <img t-if="o and company.logo and o.x_studio_standard_layout" t-att-src="image_data_uri(company.logo)" class="float-start" alt="Logo"/>
- <!-- if we are on a model and we want the alternative layout -->
- <img t-elif="o" t-att-src="image_data_uri(o.company_id.x_studio_logo)" class="float-start" alt="Logo"/>
- <!-- so that we can open the document layout configurator -->
- <img t-else="" t-att-src="image_data_uri(company.logo)" class="float-start" alt="Logo"/>
- </xpath>
- <xpath expr="//ul[@class='list-unstyled']" position="inside">
- <li t-if="company.is_company_details_empty">
- <t t-esc="company.partner_id" t-options="{"widget": "contact", "fields": ["address", "name"], "no_marker": true}"/>
- </li>
- <li t-elif="o and o.x_studio_standard_layout">
- <!-- if we are on a model, that we have company header and that we want to keep the standard layout -->
- <t t-esc="company.company_details"/>
- </li>
- <li t-elif="o">
- <!-- if we are on a model and we want the alternative layout -->
- <t t-field="o.company_id.x_studio_header"/>
- </li>
- <li t-else="">
- <!-- so that we can open the document layout configurator -->
- <t t-field="company.company_details"/>
- </li>
- </xpath>
- <xpath expr="//div[@t-field='company.report_footer']" position="replace">
- <!-- if we are on a model, that we have company header and that we want to keep the standard layout -->
- <div t-if="o and o.x_studio_standard_layout" t-field="company.report_footer"/>
- <!-- if we are on a model and we want the alternative layout -->
- <div t-elif="o" t-field="company.x_studio_footer"/>
- <!-- so that we can open the document layout configurator -->
- <div t-else="" t-field="company.report_footer"/>
- </xpath>
- </data>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement