From 3ab38618a9be80e42580aa4fbb0cfbe13732c58d Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Tue, 24 May 2016 16:58:03 +0200 Subject: [PATCH] [FIX] account: use new `convert_to_write` api --- addons/account/models/account_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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?'))