Do not fail when testing if account is set on invoice line for project
If there is no product defined on the project, the call to on_change_product for the invoice line does not set the account field. Closes #13111 (grafted from 01992016f36efdf8576a2453a084ba642e43d74f) --HG-- branch : 7.0
This commit is contained in:
@@ -592,7 +592,7 @@ class Work(Effort, Progress, Timesheet, metaclass=PoolMeta):
|
||||
invoice_line.unit = key['unit']
|
||||
invoice_line.product = product
|
||||
invoice_line.on_change_product()
|
||||
if not invoice_line.account:
|
||||
if not getattr(invoice_line, 'account', None):
|
||||
if invoice_line.product:
|
||||
raise InvoicingError(
|
||||
gettext(
|
||||
|
||||
Reference in New Issue
Block a user