Skip to content
Snippets Groups Projects
Commit 6afff40d authored by Paolo (pgi)'s avatar Paolo (pgi)
Browse files

[FIX] l10n_it, l10n_it_edi_sdicoop: Backport of staging fixes

Fixes to:  https://github.com/odoo/odoo/pull/94406
backported from its fw-port:  https://github.com/odoo/odoo/pull/95176



1) The test for reverse charge should only consider tags for
its country (Italy)
2) The report template shouldn't change its structure, even
if one field is not shown.
3) (enterprise) Mexican invoice template should target the note by
name and not by t-if condition

closes odoo/odoo#95244

Related: odoo/enterprise#29088
Signed-off-by: default avatarFlorian Gilbert (flg) <flg@odoo.com>
parent 45b5ff34
No related branches found
No related tags found
No related merge requests found
......@@ -2,8 +2,13 @@
<odoo>
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
<xpath expr="//p[@name='note']" position="replace">
<p t-if="o.move_type == 'out_invoice' and o.fiscal_position_id.note" name="note">
<span t-field="o.fiscal_position_id.note"/>
<p name="note">
<t t-if="o.move_type == 'out_invoice' and o.fiscal_position_id.note">
<span t-field="o.fiscal_position_id.note"/>
</t>
<t t-else="">
<span/>
</t>
</p>
</xpath>
</template>
......
......@@ -19,7 +19,10 @@ class TestItEdiReverseCharge(TestItEdi):
# Helper functions -----------
def get_tag_ids(tag_codes):
""" Helper function to define tag ids for taxes """
return cls.env['account.account.tag'].search([('applicability', '=', 'taxes'), ('name', 'in', tag_codes)]).ids
return cls.env['account.account.tag'].search([
('applicability', '=', 'taxes'),
('country_id.code', '=', 'IT'),
('name', 'in', tag_codes)]).ids
RepartitionLine = namedtuple('Line', 'factor_percent repartition_type tag_ids')
def repartition_lines(*lines):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment