15b22aac2a2543260cb5a6e0e6d3f27f9bb3dda3
Use Case 1
Steps to reproduce :
Create a MO without BOM, schedule a WO (OP1), save and confirm.
Add a second WO (OP2) scheduled before OP1 and save
Expected behavior:
Workorders are correctly planned and MO is ready to be processed
Actual Behavior
TypeError due to the default `duration_expected` value of 0.0 being interpreted as False at
https://github.com/odoo/odoo/blob/3e49e533892f94eeb094a436fa34cbac3ed7ad6d/addons/mrp/models/mrp_workorder.py#L419
which results in `date_planned_finished = False`.
This causes a traceback at https://github.com/odoo/odoo/blob/3e49e533892f94eeb094a436fa34cbac3ed7ad6d/addons/mrp/models/mrp_workorder.py#L502
due to trying to compare a date and a boolean.
-----------
Use Case 2
Steps to reproduce :
Create a new MO without BoM and with 2 workorders
Set a `date_planned_start` value for the 2nd workorder
Confirm MO + Plan MO
Set a 'date_planned_start' value for the 1st workorder
Save MO
Expected behavior:
Workorders are correctly planned and MO is ready to be processed
Actual behavior:
TyperError due to 'leave_id.date_from' set to False at https://github.com/odoo/odoo/blob/3e49e533892f94eeb094a436fa34cbac3ed7ad6d/addons/mrp/models/mrp_production.py#L1324
It was caused by a bad condition at https://github.com/odoo/odoo/blob/3e49e533892f94eeb094a436fa34cbac3ed7ad6d/addons/mrp/models/mrp_workorder.py#L506
leading to an exit of the method at https://github.com/odoo/odoo/blob/3e49e533892f94eeb094a436fa34cbac3ed7ad6d/addons/mrp/models/mrp_workorder.py#L510
before creation of the aforementioned 'leave_id' at https://github.com/odoo/odoo/blob/3e49e533892f94eeb094a436fa34cbac3ed7ad6d/addons/mrp/models/mrp_workorder.py#L537-L547
closes odoo/odoo#105878
Task: 2985735
X-original-commit: 45ae7a459672bf130296b541a015db461845a051
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%