From 958cf978d77da7d24b033fda9af76c37dcc3bd9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20V=C3=A1squez?= <ramon.vasquez@eynes.com.ar> Date: Wed, 14 Aug 2024 17:48:40 -0300 Subject: [PATCH] [FIX][T5420] Voucher type error --- models/account_invoice.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/models/account_invoice.py b/models/account_invoice.py index 7729227..b5aff06 100644 --- a/models/account_invoice.py +++ b/models/account_invoice.py @@ -93,6 +93,11 @@ class AccountInvoice(models.Model): compute="_compute_is_ranch_invoice", ) + @api.onchange('denomination_id', 'fiscal_type_id', 'is_debit_note', 'partner_id', 'type') + def domain_voucher_type(self): + if not self._context.get('ranch_type', False): + return super(AccountInvoice, self).domain_voucher_type() + def update_amount_total(self): for line in self.tax_line_ids: if line.tax_id.tax_group == "vat" and line.base > 0.0: -- GitLab