[IMP] web: invoice layout
Before this PR, when multi vat was activated and a foreign vat number was set on a fiscal position it was not printed on the invoice for the following layout: Striped, light and boxed. The Bold layout is not impacted since it does not use company details. This PR adds the foreign vat on the invoice when it's necessary. Task-id: 3248767 X-original-commit: 181bd158d149530d085b6da7e1c5ca3003f36bd3 Part-of: odoo/odoo#124440
This commit is contained in:
@@ -304,7 +304,13 @@
|
||||
</div>
|
||||
<img t-if="company.logo" t-att-src="image_data_uri(company.logo)" class="float-start" alt="Logo"/>
|
||||
<div class="float-start company_address">
|
||||
<span t-if="company.company_details" t-field="company.company_details"></span>
|
||||
<ul class="list-unstyled" t-if="company.company_details or forced_vat">
|
||||
<li t-if="company.company_details"> <t t-esc="company.company_details"/></li>
|
||||
<li t-if="forced_vat">
|
||||
<t t-esc="company.country_id.vat_label or 'Tax ID'"/>:
|
||||
<span t-esc="forced_vat"/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="clearfix mb8"/>
|
||||
</div>
|
||||
@@ -340,7 +346,13 @@
|
||||
<div class="col-6 text-end mb4">
|
||||
<div class="mt0 h4" t-field="company.report_header"/>
|
||||
<div name="company_address" class="float-end mb4">
|
||||
<span t-if="company.company_details" t-field="company.company_details"></span>
|
||||
<ul class="list-unstyled" t-if="company.company_details or forced_vat">
|
||||
<li t-if="company.company_details"> <t t-esc="company.company_details"/></li>
|
||||
<li t-if="forced_vat">
|
||||
<t t-esc="company.country_id.vat_label or 'Tax ID'"/>:
|
||||
<span t-esc="forced_vat"/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -368,14 +380,20 @@
|
||||
<template id="external_layout_bold">
|
||||
<div t-attf-class="header o_company_#{company.id}_layout" t-att-style="report_header_style">
|
||||
<div class="o_clean_header">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<img t-if="company.logo" t-att-src="image_data_uri(company.logo)" alt="Logo"/>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<img t-if="company.logo" t-att-src="image_data_uri(company.logo)" alt="Logo"/>
|
||||
</div>
|
||||
<div class="col-5 offset-1" name="company_address">
|
||||
<ul class="list-unstyled" t-if="company.company_details or forced_vat">
|
||||
<li t-if="company.company_details"> <t t-esc="company.company_details"/></li>
|
||||
<li t-if="forced_vat">
|
||||
<t t-esc="company.country_id.vat_label or 'Tax ID'"/>:
|
||||
<span t-esc="forced_vat"/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-5 offset-1" name="company_address">
|
||||
<span t-if="company.company_details" t-field="company.company_details"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -419,9 +437,14 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6" name="company_address">
|
||||
<span t-if="company.company_details" t-field="company.company_details"></span>
|
||||
<span t-else="" t-field="company.partner_id"
|
||||
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'/>
|
||||
<ul class="list-unstyled">
|
||||
<li t-if="company.company_details"> <t t-esc="company.company_details"/></li>
|
||||
<li t-else=""> <t t-esc="company.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'/></li>
|
||||
<li t-if="forced_vat">
|
||||
<t t-esc="company.country_id.vat_label or 'Tax ID'"/>:
|
||||
<span t-esc="forced_vat"/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -552,6 +575,7 @@
|
||||
|
||||
<template id="styles_company_report">
|
||||
<t t-foreach="company_ids" t-as="company" t-translation="off">
|
||||
<t t-set="forced_vat" t-value="False"/>
|
||||
<t t-set="font" t-value="company.font or 'Lato'" />
|
||||
<t t-set="primary" t-value="company.primary_color or 'black'" />
|
||||
<t t-set="secondary" t-value="company.secondary_color or 'black'" />
|
||||
|
||||
Reference in New Issue
Block a user