Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0] [MIG] product_multi_company: Migration to 17.0 #625

Merged
merged 43 commits into from
Nov 21, 2024

Conversation

rven
Copy link

@rven rven commented May 21, 2024

No description provided.

@rven rven mentioned this pull request May 21, 2024
14 tasks
@rven rven force-pushed the 17.0-mig-product_multi_company branch from 63bb4a6 to beb3a03 Compare May 21, 2024 13:42
@pedrobaeza
Copy link
Member

/ocabot migration product_multi_company

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone May 21, 2024
@rven rven force-pushed the 17.0-mig-product_multi_company branch 2 times, most recently from 092a62b to 85e0927 Compare May 21, 2024 15:24
@pedrobaeza
Copy link
Member

@rven can you rebase and fix conflicts?

Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

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

Can you rebase your migration over branch 16.0?

@rven
Copy link
Author

rven commented Nov 20, 2024

Can you rebase your migration over branch 16.0?

Why 16? this is the 17.0 migration...

@pedrobaeza
Copy link
Member

"Rebase" means to check the latest commits from 16.0 to be incorporated here, which there are several.

pedrobaeza and others added 17 commits November 20, 2024 18:59
==========================================
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/
prabakaran and others added 15 commits November 20, 2024 18:59
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/
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
@rven rven force-pushed the 17.0-mig-product_multi_company branch from c9de702 to cb6ebd0 Compare November 20, 2024 18:28
@rven rven force-pushed the 17.0-mig-product_multi_company branch from cb6ebd0 to 31991f8 Compare November 20, 2024 18:34
Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

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

Code and functional review 👍

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 17.0-ocabot-merge-pr-625-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 51f9ea8 into OCA:17.0 Nov 21, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at de7fdaa. 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.