Set product to None on supplier invoice when product name is not found
Closes #12774
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user