Skip to content

[14.0][IMP] product_supplier_inter-multi_company: multi-company supplierinfo#918

Open
HekkiMelody wants to merge 3 commits intoOCA:14.0from
PyTech-SRL:14.0-supplierinfo-multi-company
Open

[14.0][IMP] product_supplier_inter-multi_company: multi-company supplierinfo#918
HekkiMelody wants to merge 3 commits intoOCA:14.0from
PyTech-SRL:14.0-supplierinfo-multi-company

Conversation

@HekkiMelody
Copy link
Contributor

@HekkiMelody HekkiMelody commented Dec 12, 2025

Add company_ids to supplierinfo in order to make them visible to some but not all companies. This solves an issue with supplierinfo for products shared only among some companies.

When creating intercompany supplierinfo automatically, sync the product's company_ids with the supplierinfo.

Steps to reproduce:

  • product with companies A and B and not C
  • generate an intercompany supplierinfo
  • With only company C, try loading the supplierinfo list view -> The supplierinfo is visible to company C, even though the product is not.

To Do:

  • migration to recompute all intercompany supplierinfo
  • unit test

@HekkiMelody HekkiMelody force-pushed the 14.0-supplierinfo-multi-company branch 3 times, most recently from 1601f2a to de6e25e Compare December 12, 2025 16:28
@HekkiMelody
Copy link
Contributor Author

The two commits updating rebel modules and disabling auto-install are due to an incompatibility between multi-company/product_supplierinfo_intercompany_multi_company and product_attribute/product_supplierinfo_group (which is a dependency of multi-company/product_supplierinfo_group_intercompany)

This line https://github.com/OCA/product-attribute/blob/14.0/product_supplierinfo_group/models/product_supplierinfo.py#L29 bypasses the logic behind base_multi_company and therefore some access rules no longer apply as expected (the fields company_id and company_ids of supplierinfo are no longer linked as one would expect)

Add `company_ids` to supplierinfo in order to make them visible to some
but not all companies. This solves an issue with supplierinfo for
products shared only among some companies.

When creating intercompany supplierinfo automatically,
sync the product's `company_ids` with the `supplierinfo`.

Steps to reproduce:

- product with companies A and B and not C
- generate an intercompany supplierinfo
- With only company C, try loading the supplierinfo list view ->
The supplierinfo is visible to company C, even though the product is not.
@HekkiMelody HekkiMelody force-pushed the 14.0-supplierinfo-multi-company branch from 490187e to 526e3c9 Compare December 16, 2025 11:12
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.

1 participant

Comments