Always set a value for invoice line unit from UBL invoice and credit note
The search for similar line needs to test if the unit has a value or not. Closes #14544
This commit is contained in:
@@ -339,6 +339,8 @@ class Invoice(Model):
|
||||
raise InvoiceError(gettext(
|
||||
'edocument_ubl.msg_unit_not_found',
|
||||
code=unit_code))
|
||||
else:
|
||||
line.unit = None
|
||||
else:
|
||||
line.quantity = 1
|
||||
line.unit = None
|
||||
@@ -512,6 +514,8 @@ class Invoice(Model):
|
||||
raise InvoiceError(gettext(
|
||||
'edocument_ubl.msg_unit_not_found',
|
||||
code=unit_code))
|
||||
else:
|
||||
line.unit = None
|
||||
else:
|
||||
line.quantity = -1
|
||||
line.unit = None
|
||||
|
||||
Reference in New Issue
Block a user