Skip to content

Commit

Permalink
[FIX] l10n_es: Add missing repartition lines to tax
Browse files Browse the repository at this point in the history
Account tax `account_tax_template_p_irpf19cs` doesn't include
any repartition lines in the record. This provokes an error
while upgrading from earlier versions as it will trigger the error
```
ValidationError(_("Invoice and credit note distribution should each contain exactly one line for the base."))
```

Steps to reproduce:
- On a fresh 14.0 db, install module `l10n_es`
- Upgrade to 15.0

closes odoo#163986

Signed-off-by: Josse Colpaert <jco@odoo.com>
  • Loading branch information
filisbits committed May 2, 2024
1 parent 0f2bec2 commit 0e0c0de
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions addons/l10n_es/data/account_tax_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5071,6 +5071,29 @@
<field name="amount" eval="-19"/>
<field name="amount_type">percent</field>
<field name="tax_group_id" ref="tax_group_retenciones_19"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'factor_percent': 100,
'repartition_type': 'base',
}),
(0,0, {
'factor_percent': 100,
'repartition_type': 'tax',
'account_id': ref('l10n_es.account_common_4751'),
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'factor_percent': 100,
'repartition_type': 'base',
}),
(0,0, {
'factor_percent': 100,
'repartition_type': 'tax',
'account_id': ref('l10n_es.account_common_4751'),
}),
]"/>
</record>
<record id="account_tax_template_p_irpf35cya" model="account.tax.template">
<field name="description"/> <!-- for resetting the value on existing DBs -->
Expand Down

0 comments on commit 0e0c0de

Please sign in to comment.