[FIX] stock_account: Cannot validate some invoices
Steps to reproduce the bug: - create an invoice - add one line without product but with a uom - validate it Bug: A traceback was raised because no product was set on the invoice line. opw:1825464
This commit is contained in:
@@ -44,6 +44,8 @@ class AccountInvoiceLine(models.Model):
|
||||
|
||||
def _get_anglo_saxon_price_unit(self):
|
||||
self.ensure_one()
|
||||
if not self.product_id:
|
||||
return self.price_unit
|
||||
return self.product_id._get_anglo_saxon_price_unit(uom=self.uom_id)
|
||||
|
||||
def _get_price(self, company_currency, price_unit):
|
||||
|
||||
Reference in New Issue
Block a user