[FIX] account,l10n_es: Adding company registry
For the l10n_es localisation, we needed to print on the invoice the company id of the partner we send the invoice to. To do that, I had to add some id to make the xpath work. Task-3281337 closes odoo/odoo#125596 X-original-commit: 845b275846e49a923a9e181ad37cee3c691f16d0 Signed-off-by: William André (wan) <wan@odoo.com> Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
<div class="col-6" name="address_not_same_as_shipping">
|
||||
<t t-set="address">
|
||||
<address class="mb-0" t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/>
|
||||
<div t-if="o.partner_id.vat">
|
||||
<div t-if="o.partner_id.vat" id="partner_vat_address_not_same_as_shipping">
|
||||
<t t-if="o.company_id.account_fiscal_country_id.vat_label" t-out="o.company_id.account_fiscal_country_id.vat_label" id="inv_tax_id_label"/>
|
||||
<t t-else="">Tax ID</t>: <span t-field="o.partner_id.vat"/>
|
||||
</div>
|
||||
@@ -27,24 +27,24 @@
|
||||
</t>
|
||||
<t t-elif="o.partner_shipping_id and (o.partner_shipping_id == o.partner_id)">
|
||||
<div class="offset-col-6 col-6" name="address_same_as_shipping">
|
||||
<t t-set="address">
|
||||
<address class="mb-0" t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/>
|
||||
<div t-if="o.partner_id.vat">
|
||||
<t t-if="o.company_id.account_fiscal_country_id.vat_label" t-out="o.company_id.account_fiscal_country_id.vat_label" id="inv_tax_id_label"/>
|
||||
<t t-else="">Tax ID</t>: <span t-field="o.partner_id.vat"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-set="address">
|
||||
<address class="mb-0" t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/>
|
||||
<div t-if="o.partner_id.vat" id="partner_vat_address_same_as_shipping">
|
||||
<t t-if="o.company_id.account_fiscal_country_id.vat_label" t-out="o.company_id.account_fiscal_country_id.vat_label" id="inv_tax_id_label"/>
|
||||
<t t-else="">Tax ID</t>: <span t-field="o.partner_id.vat"/>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<div class="offset-col-6 col-6" name="no_shipping">
|
||||
<t t-set="address">
|
||||
<address class="mb-0" t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/>
|
||||
<div t-if="o.partner_id.vat">
|
||||
<t t-if="o.company_id.account_fiscal_country_id.vat_label" t-out="o.company_id.account_fiscal_country_id.vat_label" id="inv_tax_id_label"/>
|
||||
<t t-else="">Tax ID</t>: <span t-field="o.partner_id.vat"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-set="address">
|
||||
<address class="mb-0" t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/>
|
||||
<div t-if="o.partner_id.vat" id="partner_vat_no_shipping">
|
||||
<t t-if="o.company_id.account_fiscal_country_id.vat_label" t-out="o.company_id.account_fiscal_country_id.vat_label" id="inv_tax_id_label"/>
|
||||
<t t-else="">Tax ID</t>: <span t-field="o.partner_id.vat"/>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
@@ -27,6 +27,8 @@ Spanish charts of accounts (PGCE 2008).
|
||||
],
|
||||
'data': [
|
||||
'data/account_tax_data.xml',
|
||||
|
||||
'views/report_invoice.xml',
|
||||
],
|
||||
'demo': [
|
||||
'demo/demo_company.xml',
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
|
||||
<!-- add company id -->
|
||||
<xpath expr="//div[@id='partner_vat_address_not_same_as_shipping']" position="after">
|
||||
<div t-if="o.partner_id.company_registry and o.company_id.country_code == 'ES'">
|
||||
ID: <span t-field="o.partner_id.company_registry"/>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[@id='partner_vat_address_same_as_shipping']" position="after">
|
||||
<div t-if="o.partner_id.company_registry and o.company_id.country_code == 'ES'">
|
||||
ID: <span t-field="o.partner_id.company_registry"/>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[@id='partner_vat_no_shipping']" position="after">
|
||||
<div t-if="o.partner_id.company_registry and o.company_id.country_code == 'ES'">
|
||||
ID: <span t-field="o.partner_id.company_registry"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user