Skip to content

[19.0][MIG] product_multi_company: Migration to 19.0#917

Open
bizzappdev wants to merge 43 commits into
OCA:19.0from
BizzAppDev-Systems:19.0-mig-product_multi_company-BAD
Open

[19.0][MIG] product_multi_company: Migration to 19.0#917
bizzappdev wants to merge 43 commits into
OCA:19.0from
BizzAppDev-Systems:19.0-mig-product_multi_company-BAD

Conversation

@bizzappdev

Copy link
Copy Markdown

Dependency PR for module base_multi_company: #889

pedrobaeza and others added 30 commits December 10, 2025 15:13
==========================================
Product permissions for discrete companies
==========================================

This modules allows to select in which of the companies you want to use each
of the products.

Installation
============

This module uses the post and uninstall hooks for updating default product
template security rule. This only means that updating the module will not
restore the security rule this module changes. Only a complete removal and
reinstallation will serve.

Usage
=====

On the product form view, go to the "Information" tab, and put the companies
in which you want to use that product. If none is selected, the product will
be visible in all of them. The default value is the current one.
* Rename manifest
* Change openerp references to odoo
* Bump version
* Add pragma no cover
* Edit security of product employee to allow writes (in tests)
* Fix permissions in tests
* Fix domain & add test
* Implement base_multi_company on product_multi_company
* Add related cols for product variant
…figurator

When this module is integrated with `product_variant_configurator`, tests fail because the latter makes some black magic on the `name` field.

I switch the tests to rely on the `description_sale` field instead, which isn't touched by that module, and is also a field delegated from the related `product.template`.

BTW it doesn't make sense to modify provided permissions on a test that checks access errors, so instead I switched them to use users in a group that should have access in production.

@Tecnativa TT27288
Currently translated at 100.0% (4 of 4 strings)

Translation: multi-company-13.0/multi-company-13.0-product_multi_company
Translate-URL: https://translation.odoo-community.org/projects/multi-company-13-0/multi-company-13-0-product_multi_company/es/
In order to extend testing, a common class is necessary to avoid code
duplication.
…ect context

As some default values can come from current company (e.g.: main one), change context
when creating.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: multi-company-15.0/multi-company-15.0-product_multi_company
Translate-URL: https://translation.odoo-community.org/projects/multi-company-15-0/multi-company-15-0-product_multi_company/
Currently translated at 100.0% (7 of 7 strings)

Translation: multi-company-15.0/multi-company-15.0-product_multi_company
Translate-URL: https://translation.odoo-community.org/projects/multi-company-15-0/multi-company-15-0-product_multi_company/es/
Remove dependency to stock and its overwritten fields, this logic should
go  if ever done in a separate module named: product_multi_company_stock

TT48972
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: multi-company-16.0/multi-company-16.0-product_multi_company
Translate-URL: https://translation.odoo-community.org/projects/multi-company-16-0/multi-company-16-0-product_multi_company/
The description shouldn't be overriden in any child module, as it's a traversal data that then changes all the translations.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: multi-company-16.0/multi-company-16.0-product_multi_company
Translate-URL: https://translation.odoo-community.org/projects/multi-company-16-0/multi-company-16-0-product_multi_company/
mymage and others added 11 commits December 10, 2025 15:22
Currently translated at 100.0% (4 of 4 strings)

Translation: multi-company-16.0/multi-company-16.0-product_multi_company
Translate-URL: https://translation.odoo-community.org/projects/multi-company-16-0/multi-company-16-0-product_multi_company/it/
product.product has a delageted inheritance from product.template so we
are getting the fields logic but not the ORM logic. We need some of that
logic in the search method to be able to get the right results with
domains like [("company_id", "in", [1, False]) to include records which
are shared between companies.

TT51779
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: multi-company-17.0/multi-company-17.0-product_multi_company
Translate-URL: https://translation.odoo-community.org/projects/multi-company-17-0/multi-company-17-0-product_multi_company/
… company assignments

Remove lots of code thanks to OCA#760.

Also, call the new `fill_company_ids` hook, to respect company assignments done before the module installation.

@moduon MT-8873
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: multi-company-17.0/multi-company-17.0-product_multi_company
Translate-URL: https://translation.odoo-community.org/projects/multi-company-17-0/multi-company-17-0-product_multi_company/

@weinni2000 weinni2000 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@isturiz

isturiz commented Dec 16, 2025

Copy link
Copy Markdown

@bizzappdev bizzappdev force-pushed the 19.0-mig-product_multi_company-BAD branch from 4679703 to 6197222 Compare December 17, 2025 05:44
@bizzappdev bizzappdev marked this pull request as ready for review December 17, 2025 05:54
@astirpe astirpe mentioned this pull request Mar 20, 2026
1 task
@github-actions

Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Apr 19, 2026
@EmilioPascual

Copy link
Copy Markdown

@bizzappdev can you rebase for launch runboat? Now, it's down. Thank you

@github-actions github-actions Bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label May 17, 2026
@EmilioPascual

Copy link
Copy Markdown

@bizzappdev Could you rebase please? A runboat is necessary for functional review. I requested you for it a month ago. I'm afraid I’ll have to supersed this PR for a new one if you don't reply. Thank you.

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.