Friday, March 10, 2023
1 change · master
Resolved issues and error corrections
The Sales Planning workflow now opens correctly when a sales order has no linked planning slot. Instead of failing, the system uses today's date as the starting point, allowing users to continue planning service hours without interruption.
Original PR description
Steps: Create a plannable service. Create a SO with this product, and confirm it. Click on "Hours to Plan" stat button. Issue: Traceback. Cause: If there is no planning slot linked to the SO, SaleOrder.planning_initial_date is set to False. Then, it is put in the context of the action we call. Then JS tries to evaluate false as a date, and so it crashes. Fix: If there is no planning slot linked to the SO, set SaleOrder.planning_initial_date to today. task-3226804