Skip to content

[18.0][MIG] stock_available_mrp: Migration to 18.0#38

Closed
absal-smile wants to merge 76 commits into
OCA:18.0from
absal-smile:18.0-mig-stock_available_mrp
Closed

[18.0][MIG] stock_available_mrp: Migration to 18.0#38
absal-smile wants to merge 76 commits into
OCA:18.0from
absal-smile:18.0-mig-stock_available_mrp

Conversation

@absal-smile
Copy link
Copy Markdown

No description provided.

sbidoul and others added 30 commits January 31, 2025 14:42
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/stock-logistics-warehouse#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 2fd14db57433d08ab368a7e18d18ae8d49dafab1 (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-ci and others added 17 commits January 31, 2025 14:42
Currently translated at 100.0% (10 of 10 strings)

Translation: stock-logistics-availability-16.0/stock-logistics-availability-16.0-stock_available_mrp
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-availability-16-0/stock-logistics-availability-16-0-stock_available_mrp/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-availability-16.0/stock-logistics-availability-16.0-stock_available_mrp
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-availability-16-0/stock-logistics-availability-16-0-stock_available_mrp/
Currently translated at 100.0% (2 of 2 strings)

Translation: stock-logistics-availability-16.0/stock-logistics-availability-16.0-stock_available_mrp
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-availability-16-0/stock-logistics-availability-16-0-stock_available_mrp/es/
Currently translated at 100.0% (2 of 2 strings)

Translation: stock-logistics-availability-16.0/stock-logistics-availability-16.0-stock_available_mrp
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-availability-16-0/stock-logistics-availability-16-0-stock_available_mrp/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-availability-17.0/stock-logistics-availability-17.0-stock_available_mrp
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-availability-17-0/stock-logistics-availability-17-0-stock_available_mrp/
When a BoM is linked just to one variant through field `product_id`,
it is taken in account when computing stock of the rest of variants
of the same template.
Currently translated at 100.0% (6 of 6 strings)

Translation: stock-logistics-availability-17.0/stock-logistics-availability-17.0-stock_available_mrp
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-availability-17-0/stock-logistics-availability-17-0-stock_available_mrp/it/
@absal-smile absal-smile mentioned this pull request Jan 31, 2025
7 tasks
@ellbristow
Copy link
Copy Markdown

I feel the changes to the res.config.settings layout make the config for this a bit unclear compares to how it used to be in older versions.

Old:
image

New:
image

Am I missing something, or misunderstanding?

@antonioburic
Copy link
Copy Markdown
Member

thanks @absal-smile for the migrated module!
I agree with the comment above, it does make it slightly less clear potentially ^^

I've also raised this small PR to include a fix previously done for v16 and 17 (yet to be merged in), if you agree please include/merge it in here: absal-smile#1

Copy link
Copy Markdown

@CasVissers-360ERP CasVissers-360ERP left a comment

Choose a reason for hiding this comment

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

Functional review

@XenoMannens
Copy link
Copy Markdown

XenoMannens commented Nov 3, 2025

Hey, We are migrating a customer to v18 that wants to use this module, is there any update on when it will be merged ?

Thanks in advance

<field name="categ_id" ref="product.product_category_5" />
<field name="standard_price">1.0</field>
<field name="list_price">5.0</field>
<field name="type">product</field>
Copy link
Copy Markdown
Member

@StefanRijnhart StefanRijnhart Dec 18, 2025

Choose a reason for hiding this comment

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

Set type 'consu' + is_storable True

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't it be consu?

Copy link
Copy Markdown
Member

@StefanRijnhart StefanRijnhart Dec 18, 2025

Choose a reason for hiding this comment

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

Yes! (original message corrected)

@StefanRijnhart

This comment was marked as outdated.

@pedrobaeza
Copy link
Copy Markdown
Member

/ocabot migration stock_available_mrp

@pedrobaeza pedrobaeza changed the title [MIG] stock_available_mrp: Migration to 18.0 [18.0][MIG] stock_available_mrp: Migration to 18.0 Dec 18, 2025
@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Dec 18, 2025
@StefanRijnhart
Copy link
Copy Markdown
Member

Superseded by #68

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.