Wednesday, May 21, 2025
1 change · saas-18.1
Resolved issues and error corrections
Users can now create and confirm a sales order from a billable project without seeing an erroneous warning that it was already confirmed. This removes a blocker in the project billing workflow and helps teams proceed smoothly from project setup to sales order confirmation.
Original PR description
Before this commit, when the user clicks on `Make Billable` stat button displayed in the project form view when there is not yet any SO set on that project and directly confirm the SO, a user error…
Before this commit, when the user clicks on `Make Billable` stat button displayed in the project form view when there is not yet any SO set on that project and directly confirm the SO, a user error is raised because the SO is already confirmed after executing confirm action of that button clicked. The reason is because in that case, the SO is automatically confirmed during the creation of that SO which means the action_confirm could be called 2 times in that use case, one during the save (creation) and another one because the user clicks on `Confirm` button. This commit makes sure the action_confirm does nothing if the SO is already confirmed and we are in the context in which the user creates the SO via the stat button in project. Steps to reproduce ------------------ 0. install sale_project or sale_timesheet modules 1. Go to Projects > Confirmation > Projects 2. Click on `New` button to create a new project 3. Enable `Billable` feature if it is not already the case by default 4. Add a customer to the project 5. Click on `Make Billable` stat button 6. Add a service product on the SO to create 7. Click on `Confirm` button. Expected behavior ----------------- The SO should be created and confirmed without any issues Current Behavior ---------------- A user error is raised because the SO is already confirmed before executing the action for the button clicked. task-4781751