-
- Downloads
[FIX] mrp: wrong workorder state in tests
As a good pratice, in compute method, we assign a default value before we do the actual calculation to avoid issues like no value is assigned for fields with required=True. For example `reservation_state`: https://github.com/odoo/odoo/blob/7ebc8cc5771d069b32722d493dd0ae5341e54c96/addons/mrp/models/mrp_production.py#L572 However, since workorder state is depends on this field: https://github.com/odoo/odoo/blob/7ebc8cc5771d069b32722d493dd0ae5341e54c96/addons/mrp/models/mrp_workorder.py#L158-L159 For some reason, this unexpected false value can lead to some transit wrong state in tests (it happens when you run the test, but correct state show when you put a breakpoint and step into each state computation). To solve it, we remove this default value assignment. It should be safe since this field is not required. closes odoo/odoo#134264 Related: odoo/enterprise#46875 Signed-off-by:Steve Van Essche <svs@odoo.com>
Loading
Please register or sign in to comment