[FIX] stock: fix null value for product tracking
Due to the recent changes of precompute. The `tracking` fields of `product.template` would never be filled with the default 'none' when the module was not loaded. This means that any new product.product demo/data would fail the upgrade scripts. TaskId-2675382
This commit is contained in:
@@ -638,7 +638,7 @@ class ProductTemplate(models.Model):
|
||||
('serial', 'By Unique Serial Number'),
|
||||
('lot', 'By Lots'),
|
||||
('none', 'No Tracking')],
|
||||
string="Tracking", required=True,
|
||||
string="Tracking", required=True, default='none', # Not having a default value here causes issues when migrating.
|
||||
compute='_compute_tracking', store=True, readonly=False, precompute=True,
|
||||
help="Ensure the traceability of a storable product in your warehouse.")
|
||||
description_picking = fields.Text('Description on Picking', translate=True)
|
||||
|
||||
Reference in New Issue
Block a user