forked from OCA/purchase-workflow
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] procurement_purchase_no_grouping: Take into account SO updates
Steps to reproduce: - Create a product with MTO route and "No line grouping" product category. - Create an SO with such product and quantity = 1. - Confirm it. - A purchase order is created with such product and qty = 1. - Edit the sales order, and change quantity = 2. Current behavior: A new purchase line is created with quantity = 2, having ordered 3 units instead of 2. Expected behavior: The same existing purchase line is updated with quantity = 2. ------ For solving this problem, we are going to group by procurement group instead of simply discarding any possible line grouping. NOTE: This makes that if you manually assign the same procurement group to several different sales orders, the grouping will be done no matter the grouping criteria, but this is the only way to do it without having to put a lot of glue modules, and on standard operation mode, procurement groups are not reused between sales orders. TT33031
- Loading branch information
1 parent
c822713
commit 8df3b45
Showing
5 changed files
with
46 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- If you reuse the same procurement group between several sales orders, and | ||
using "No line grouping", they will be grouped anyways, as the criteria for | ||
grouping or not should be kept to the same procurement group, as it's the only | ||
way to get proper quantities updates after confirming the sales order. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters