[FIX] l10n_be_intrastat_2019: country of origin

Add the country of origin of the various PDF invoice reports.

opw-2003463

closes odoo/odoo#33749

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
Nicolas Martinelli
2019-05-29 12:12:09 +00:00
parent 01020e18e9
commit 87d69b0097
2 changed files with 34 additions and 0 deletions
@@ -10,6 +10,7 @@ Adds the possibility to specify the origin country of goods and the partner VAT
'depends': ['l10n_be_intrastat'],
'data': [
'views/account_invoice_line_view.xml',
'views/report_invoice.xml',
],
'auto_install': True,
}
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_invoice_document_intrastat_2019" inherit_id="account.report_invoice_document">
<xpath expr="//th[@class='hidden']" position="after">
<th class="text-right">Origin Country</th>
</xpath>
<xpath expr="//td[@class='hidden']" position="after">
<td class="text-right">
<span t-field="l.intrastat_product_origin_country_id"/>
</td>
</xpath>
</template>
<template id="report_intrastatinvoice_document_2019" inherit_id="report_intrastat.report_intrastatinvoice_document">
<xpath expr="//th[4]" position="after">
<th class="text-right">Origin Country</th>
</xpath>
<xpath expr="//td[4]" position="after">
<td class="text-right">
<span t-field="l.intrastat_product_origin_country_id"/>
</td>
</xpath>
</template>
<template id="report_invoice_layouted_intrastat_2019" inherit_id="sale.report_invoice_layouted">
<xpath expr="//t[@groups='sale.group_sale_layout']//th[1]" position="after">
<th class="text-right">Origin Country</th>
</xpath>
<xpath expr="//t[@groups='sale.group_sale_layout']//t[@t-as='l']//td[1]" position="after">
<td class="text-right">
<span t-field="l.intrastat_product_origin_country_id"/>
</td>
</xpath>
</template>
</odoo>