Set product to None on supplier invoice when product name is not found

Closes #12774
This commit is contained in:
Cédric Krier
2023-11-25 21:28:50 +01:00
parent c6335a368c
commit 3dc49cc1ae
+4 -2
View File
@@ -181,8 +181,10 @@ class IncomingSupplierInvoice(metaclass=PoolMeta):
])
except ValueError:
logger.debug(f"Cannot find product '{product_name}'")
line.product = product.id
line.on_change_product()
line.product = None
else:
line.product = product.id
line.on_change_product()
else:
line.product = None
line.description = line_data.get('description')