Skip to content
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

Merged
merged 51 commits into from
Jan 28, 2022

Conversation

JoanMForgeFlow
Copy link
Contributor

Standard migration of the module stock_available_mrp to version 15.0.
@LoisRForgeFlow
@ForgeFlow

sbidoul and others added 30 commits January 27, 2022 08:45
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.
    * mrp_bom.name has been deleted.
    * mrp_bom_line.type moved to mrp_bom.type.
    * Fix missing group_mrp_user issue.
    * Change versions
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
OCA-git-bot and others added 16 commits January 27, 2022 08:45
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/
@JoanMForgeFlow JoanMForgeFlow force-pushed the 15.0-mig-stock_available_mrp branch from 47a1421 to 7411e2e Compare January 28, 2022 11:00
Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Code review

Copy link
Contributor

@LoisRForgeFlow LoisRForgeFlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LoisRForgeFlow
Copy link
Contributor

/ocabot merge nobump

/ocabot migration stock_available_mrp

@OCA-git-bot OCA-git-bot added this to the 15.0 milestone Jan 28, 2022
@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 15.0-ocabot-merge-pr-1363-by-LoisRForgeFlow-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot mentioned this pull request Jan 28, 2022
80 tasks
@OCA-git-bot OCA-git-bot merged commit d947fd9 into OCA:15.0 Jan 28, 2022
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 3f44d98. Thanks a lot for contributing to OCA. ❤️

@LoisRForgeFlow LoisRForgeFlow deleted the 15.0-mig-stock_available_mrp branch January 28, 2022 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.