diff --git a/sf_tool_management/models/base.py b/sf_tool_management/models/base.py index 8daf1488..7eea666b 100644 --- a/sf_tool_management/models/base.py +++ b/sf_tool_management/models/base.py @@ -1028,7 +1028,7 @@ class ProductProduct(models.Model): 'product_id': self.id, 'lot_id': lot_id.id, 'move_id': stock_move_id.id, - 'destination_location_id': shelf_location_id.id, + 'destination_location_id': shelf_location_id.id if shelf_location_id else False, 'install_tool_time': fields.Datetime.now(), 'qty_done': 1.0, 'state': 'done',