diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index a65ec3549c9..19121cdd05a 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -331,7 +331,7 @@ class AccountInvoice(models.Model): getattr(invoice, onchange_method)() for field in changed_fields: if field not in vals and invoice[field]: - vals[field] = invoice._fields[field].convert_to_write(invoice[field]) + vals[field] = invoice._fields[field].convert_to_write(invoice[field], invoice) if not vals.get('account_id',False): raise UserError(_('Configuration error!\nCould not find any account to create the invoice, are you sure you have a chart of account installed?'))