diff --git a/modules/edocument_ubl/edocument.py b/modules/edocument_ubl/edocument.py index ebad313bb9..41a8b04fd6 100644 --- a/modules/edocument_ubl/edocument.py +++ b/modules/edocument_ubl/edocument.py @@ -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