[FIX] account: use new convert_to_write api

This commit is contained in:
Christophe Simonis
2016-05-24 16:58:03 +02:00
parent bb442fdb8d
commit 3ab38618a9
+1 -1
View File
@@ -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?'))