Skip to content

[18.0][FIX] product_multi_company_stock: Adding a company to a product must not affect existing lots#991

Merged
OCA-git-bot merged 1 commit intoOCA:18.0from
ForgeFlow:18.0-fix-product_multi_company_stock
Apr 24, 2026
Merged

[18.0][FIX] product_multi_company_stock: Adding a company to a product must not affect existing lots#991
OCA-git-bot merged 1 commit intoOCA:18.0from
ForgeFlow:18.0-fix-product_multi_company_stock

Conversation

@LoisRForgeFlow
Copy link
Copy Markdown
Contributor

Bug: adding a new company to a product's company_ids triggers a recompute of stock.lot.company_id (which depends on product_id.company_id). Both lots evaluate product_id.company_id in the same env context, so they end up with the same company_id, causing _check_unique_lot to raise a ValidationError even though no lot data changed.

@OCA-git-bot OCA-git-bot added series:18.0 mod:product_multi_company_stock Module product_multi_company_stock labels Apr 22, 2026
@LoisRForgeFlow LoisRForgeFlow force-pushed the 18.0-fix-product_multi_company_stock branch 3 times, most recently from ba9cb2a to e74af12 Compare April 22, 2026 10:25
@LoisRForgeFlow LoisRForgeFlow force-pushed the 18.0-fix-product_multi_company_stock branch 2 times, most recently from 18d76f6 to 272e51f Compare April 24, 2026 09:05
… not affect existing lots

Bug: adding a new company to a product's company_ids triggers a
recompute of stock.lot.company_id (which depends on product_id.company_id).
Both lots evaluate product_id.company_id in the same env context, so
they end up with the same company_id, causing _check_unique_lot to raise
a ValidationError even though no lot data changed.
@LoisRForgeFlow LoisRForgeFlow force-pushed the 18.0-fix-product_multi_company_stock branch from 272e51f to c621733 Compare April 24, 2026 09:20
@LoisRForgeFlow
Copy link
Copy Markdown
Contributor Author

/ocabot merge patch

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 18.0-ocabot-merge-pr-991-by-LoisRForgeFlow-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 3e3246e into OCA:18.0 Apr 24, 2026
7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

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

@LoisRForgeFlow LoisRForgeFlow deleted the 18.0-fix-product_multi_company_stock branch April 24, 2026 09:59
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.

5 participants