Skip to content

[19.0][MIG] sale_mrp_bom#4107

Open
JasminSForgeFlow wants to merge 29 commits intoOCA:19.0from
ForgeFlow:19.0-mig-sale_mrp_bom
Open

[19.0][MIG] sale_mrp_bom#4107
JasminSForgeFlow wants to merge 29 commits intoOCA:19.0from
ForgeFlow:19.0-mig-sale_mrp_bom

Conversation

@JasminSForgeFlow
Copy link
Copy Markdown
Contributor

Standard Migration

@ForgeFlow

Copy link
Copy Markdown
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.

Functional + code 👍

Copy link
Copy Markdown
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 👍

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@rousseldenis
Copy link
Copy Markdown
Contributor

/ocabot migration sale_mrp_bom

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Jan 20, 2026
_inherit = "stock.rule"

@api.model
def run(self, procurements, raise_user_error=True):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@JasminSForgeFlow @LoisRForgeFlow

Should not all this code be avoided finding a way to replace the search in mrp module (in run() and _bom_find()) to then let Odoo mrp module do the procurement run job ?

Copy link
Copy Markdown

@alexey-pelykh alexey-pelykh left a comment

Choose a reason for hiding this comment

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

Thanks for the migration, @AaronHForgeFlow / @LoisRForgeFlow.

The procurement.group -> stock.rule refactor for the kit explosion logic looks correct for 19.0. A couple of observations:

License headers in new files: stock_rule.py and test_sale_mrp_bom_multi_line.py carry LGPL-3.0 headers (from 360ERP), while the module manifest declares AGPL-3 and all other files use AGPL-3.0. LGPL is compatible so it's not blocking, but for OCA consistency it might be worth aligning to AGPL-3.0 headers on those two files.

Translation template (sale_mrp_bom.pot) references model_procurement_group: Since 19.0 now inherits stock.rule instead of procurement.group, this ir.model reference in the pot (and the nl/nl_NL po files) looks stale from 18.0. It will likely self-correct on next pot regeneration from a running instance, but worth being aware of.

Otherwise the ORM usage, domain, constraint, view inheritance, security group, and tests all look solid. CI is green across the board.

Comment thread sale_mrp_bom/models/stock_rule.py Outdated
@@ -0,0 +1,95 @@
# Copyright 2025 360ERP (<https://www.360erp.com>)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit: this file uses LGPL-3.0 while the module is licensed AGPL-3 per __manifest__.py. Consider aligning to AGPL-3.0 for OCA consistency.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated, thanks

@@ -0,0 +1,214 @@
# Copyright 2025 360ERP (https://www.360erp.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same license header remark -- LGPL-3.0 vs module-level AGPL-3.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated, thanks

@JasminSForgeFlow
Copy link
Copy Markdown
Contributor Author

Seems tests failing because other module

Copy link
Copy Markdown
Contributor

@BhaveshHeliconia BhaveshHeliconia 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 LGTM!

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.