Skip to content

[17.0][FIX]product_multi_company: keep company_ids on variant write - #1057

Merged
OCA-git-bot merged 1 commit into
OCA:17.0from
ForgeFlow:17.0-bp-1055
Sep 14, 2026
Merged

OCA-git-bot merged 1 commit into
OCA:17.0from
ForgeFlow:17.0-bp-1055

Conversation

@LoisRForgeFlow

@LoisRForgeFlow LoisRForgeFlow commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

The product form's header includes an invisible company_id field, used as a trick to be able to set that field from the view. When the web client saves, it sends both company_id and company_ids in the same write call.

product.template.write() already protects against this collision through _multicompany_patch_vals, discarding the redundant company_id so its inverse doesn't overwrite company_ids.

product.product doesn't inherit multi.company.abstract and lacks this protection, even though it exposes the same fields (related to the template). Saving from the variant form (e.g. reached from the MRP Area Parameters view) silently reverted company_ids to a single company.

Backport of #1055 to 17.0.

@OCA-git-bot OCA-git-bot added mod:product_multi_company Module product_multi_company series:17.0 labels Sep 14, 2026
@LoisRForgeFlow

Copy link
Copy Markdown
Contributor Author

Backport, fast tracking

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 17.0-ocabot-merge-pr-1057-by-LoisRForgeFlow-bump-patch, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit 06ae22d into OCA:17.0 Sep 14, 2026
7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

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.

2 participants