Wednesday, August 28, 2024
1 change · master
Resolved issues and error corrections
Products added from a field service task now appear at the end of the related sales order, matching the expected line order. This prevents confusion for sales and operations teams when reviewing or updating orders after field service work.
Original PR description
Steps: - Create a SO with 2 SOL, among which one creates a task in fsm project upon SO confirmation. - Comfirm the SO and go to the related task. - Add a product and go back to the SO. Issue: - There's a new SOL, but it is in 2nd place, whereas it should be last. Cause: When you had SOLs directly in the SO, the 1st SOL of the SO has a sequence of 10, the 2nd - 11, etc. But when you had products via the task, it creates SOLs with sequence 10, which will always result in those lines starting in 2nd position, as they are ordered by sequence > id. Fix: Give the SOLs that are created from adding a product on the task the sequence of the last SOL. task-3768178