summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDjamel (otd) <otd@odoo.com>2021-04-09 12:13:17 +0000
committerDjamel (otd) <otd@odoo.com>2021-04-09 12:44:42 +0000
commit7cac0104625ea2bedf02a6c47801ccdb930ab939 (patch)
tree739d42cd0acc40412389bdcdedf361dd2d9dddd7
parent7faa11ca87cb5308df1d1921a674e2e2edc3f065 (diff)
[FIX] l10n_id_efaktur: fix the “_onchange_l10n_id_tax_number” method
Steps to follow to reproduce the bug: - Create an Indonesian company - Go to Invoicing settings / in “Fiscal Localization” / install Indonesian-Accounting “ l10n_id” - Go to Invoicing / Vendors / bills - Create a new bill / add a vendor / go to “other info” / add a valid Indonesian Tax Number, for example : “0112345678912345” - An error is triggered Problem: In the “_onchange_l10n_id_tax_number” method, we try to access “record.type”, but in v14 the field "type" was replaced by "move_type” in the "account.move" model. opw-2492530 closes odoo/odoo#69037 Signed-off-by: Josse Colpaert <jco@openerp.com>
-rw-r--r--addons/l10n_id_efaktur/models/account_move.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/l10n_id_efaktur/models/account_move.py b/addons/l10n_id_efaktur/models/account_move.py
index a066afc918a..5d843b9b372 100644
--- a/addons/l10n_id_efaktur/models/account_move.py
+++ b/addons/l10n_id_efaktur/models/account_move.py
@@ -45,7 +45,7 @@ class AccountMove(models.Model):
@api.onchange('l10n_id_tax_number')
def _onchange_l10n_id_tax_number(self):
for record in self:
- if record.l10n_id_tax_number and record.type not in self.get_purchase_types():
+ if record.l10n_id_tax_number and record.move_type not in self.get_purchase_types():
raise UserError(_("You can only change the number manually for a Vendor Bills and Credit Notes"))
@api.depends('l10n_id_attachment_id')