[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:
William Braeckman
2022-04-08 09:34:13 +02:00
parent 389e7789c6
commit aa1c6f05c5
+1 -1
View File
@@ -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)