Thursday, August 8, 2024
1 change · saas-17.1
Resolved issues and error corrections
Vendor bills that trigger an unusually high amount warning can now be confirmed without causing unrelated inventory errors. The fix ensures the warning process keeps the correct bill information, improving reliability for expense reinvoicing workflows.
Original PR description
Create a sale order connected to an analytic account. Create a vendor bill and on the line: - use the same analytic account - add a price such that the abnormal_amount_warning is triggered. (example: 20000000001) - add a product line in the vendor bill which can be expensed and which has reinvoice expenses policy set to “Cost” Click on Confirm, the warning will show, click on “Confirm” again Issue: An error related to stock move record will show This occurs because in order to show the warning wizard we add in context `default_move_ids` Then we don't cleanup the context, so if, during post, an inventory-related flow is triggered, it may accidentally use the context flag still set, raising an error as it will look for the wrong record opw-4021038