Fix arguments of missing_account_expense{,_property} error message
The error was introduced by the changeset 4edebebe71df Thanks to Laurent Defert issue3699 review3701002
This commit is contained in:
1 parent
f825dba304
commit
5d91a0ff88
1 file changed
+2
-2
+2
-2
@@ -1217,7 +1217,7 @@ class PurchaseLine(ModelSQL, ModelView):
|
||||
if not invoice_line.account:
|
||||
self.raise_user_error('missing_account_expense', {
|
||||
'product': invoice_line.product.rec_name,
|
||||
'purchase': invoice_line.purchase.rec_name,
|
||||
'purchase': self.purchase.rec_name,
|
||||
})
|
||||
else:
|
||||
for model in ('product.template', 'product.category'):
|
||||
@@ -1226,7 +1226,7 @@ class PurchaseLine(ModelSQL, ModelView):
|
||||
break
|
||||
if not invoice_line.account:
|
||||
self.raise_user_error('missing_account_expense_property',
|
||||
(invoice_line.purchase.rec_name,))
|
||||
{'purchase': self.purchase.rec_name})
|
||||
return [invoice_line]
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in new issue
Block a user