mirror of
https://github.com/Kalenis/kalenislims.git
synced 2023-12-14 07:13:04 +01:00
lims_production: fix error when no purchase module installed
This commit is contained in:
parent
3a1642735a
commit
d42dc7e0c3
1 changed files with 2 additions and 1 deletions
|
@ -433,7 +433,8 @@ class Lot(metaclass=PoolMeta):
|
|||
if not values.get('category'):
|
||||
product = Product(values['product'])
|
||||
lot_category_id = None
|
||||
if (product.purchasable and not product.salable):
|
||||
if (hasattr(product, 'purchasable') and
|
||||
product.purchasable and not product.salable):
|
||||
lot_category_id = (config.lot_category_input_prod.id
|
||||
if config.lot_category_input_prod else None)
|
||||
elif (not product.purchasable and product.salable):
|
||||
|
|
Loading…
Reference in a new issue