-
-
Notifications
You must be signed in to change notification settings - Fork 723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[15.0]MIG] stock_available_mrp #1363
[15.0]MIG] stock_available_mrp #1363
Conversation
Compute potential quantities for both product templates and variants. To keep the code simple, only the biggest potential of any single variant is accounted for in the template's potential. Take all levels of phantom BoM into account, respects validity dates etc. thanks to the use of the standard method _bom_explode, as suggested by @gdgellatly in OCA#5 (comment) Improve tests, rewritten in python. Adhere to new file/manifest/README conventions. Simplify copyright headers
sudo is not required since mrp.bom are readable to groups with access to the qty_x fields on a product. Moreover using sudo to retrive the bom will ignore the company_id defined on the bom
Record rules used to not be checked on stock quants, but now they are since Odoo's commit 2fd14db (odoo/odoo@2fd14db). In our test we changed the company of the products and BoMs but we neglected that the stock was not attached to the right company, and that made the test fail. To fix that, make the test inventory for the right company. Since there is a little inconsistency in the demo data with a negative quantity of an unrelated product, use the `partial` filter for the inventories instead of the `none` filter, so that no wrong inventory lines are added automatically.
…ch field use to compute potential
…ew + small improvements
* mrp_bom.name has been deleted. * mrp_bom_line.type moved to mrp_bom.type. * Fix missing group_mrp_user issue. * Change versions
…recordset + Condition never statisfied
…of immediately usable qty
…ilable_immediately
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_available_mrp Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_available_mrp/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_available_mrp Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_available_mrp/
Currently translated at 100.0% (7 of 7 strings) Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_available_mrp Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_available_mrp/zh_CN/
Currently translated at 100.0% (7 of 7 strings) Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_available_mrp Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_available_mrp/fr/
After this change odoo/odoo@3d34d58 it isn't possible to have an storable kit product anymore. The main issue is that we have to drop some uses cases that this module considered for this kind of situations.
In Odoo change odoo/odoo@3d34d58 the products with Kit BoMs couldn't longer be other than `consu`. This was reverted in odoo/odoo@6c4623a and some products are raising errors when forcing the type
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-warehouse-14.0/stock-logistics-warehouse-14.0-stock_available_mrp Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-0-stock_available_mrp/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-warehouse-14.0/stock-logistics-warehouse-14.0-stock_available_mrp Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-0-stock_available_mrp/
Use an optimized method to explode the BoM. The explode methods include data and a cycle check that we don't need here. Besides, it calls '_bom_find' on every bom line of the graph, which generates thousands of SELECT queries on large BoMs.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-warehouse-14.0/stock-logistics-warehouse-14.0-stock_available_mrp Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-0-stock_available_mrp/
47a1421
to
7411e2e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Code review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/ocabot merge nobump /ocabot migration stock_available_mrp |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 3f44d98. Thanks a lot for contributing to OCA. ❤️ |
Standard migration of the module stock_available_mrp to version 15.0.
@LoisRForgeFlow
@ForgeFlow