OCA / multi-company

GNU Affero General Public License v3.0
97 stars 279 forks source link

[16.0][MIG] product_multi_company: Migration to version 16.0 #628

Closed pilarvargas-tecnativa closed 1 month ago

pilarvargas-tecnativa commented 1 month ago

Superseed #459 because the PR is very old and the creator stopped taking care of it, this PR recovers the changes made in its migration but following all the steps of a conventional migration and finalising the migration.

cc @Tecnativa TT48972

@pedrobaeza @carolinafernandez-tecnativa please review

pedrobaeza commented 1 month ago

/ocabot migration product_multi_company

carolinafernandez-tecnativa commented 1 month ago

Functional review LGTM :)

Please rebase and check for CI. Do not forget to squash administrative commits. Thanks!

amkarthik commented 1 month ago

@carolinafernandez-tecnativa

We are getting this issue in this PR: https://github.com/OCA/multi-company/issues/252

Please check the attached video below and that is recorded in PR runboat.

https://github.com/OCA/multi-company/assets/12694917/024b9513-779c-4266-9e83-8a5e8d6591a8

Thanks

pilarvargas-tecnativa commented 1 month ago

We are getting this issue in this PR: #252

It may have been something transient in the runbot, since duplicating the user as ‘User B’ and repeating the same operation does not cause this problem.

amkarthik commented 1 month ago

We are getting this issue in this PR: #252

It may have been something transient in the runbot, since duplicating the user as ‘User B’ and repeating the same operation does not cause this problem.

Hi I tested again with the User B. (changed the password of userb to userb). Same issue happens to me. Please check.

https://github.com/OCA/multi-company/assets/12694917/7c930b43-2e2a-4a04-8f16-6db26143eda7

pilarvargas-tecnativa commented 1 month ago

Hi I tested again with the User B. (changed the password of userb to userb). Same issue happens to me. Please check.

I have retested the test locally, checking in shell the data contained in the bd if it contains the company_ids field. image image

I have replicated the error but it only happens in the case of new companies created, it does not happen with the demo companies already defined in odoo. I am still investigating the error.

amkarthik commented 1 month ago

Hi I tested again with the User B. (changed the password of userb to userb). Same issue happens to me. Please check.

I have retested the test locally, checking in shell the data contained in the bd if it contains the company_ids field. image image

I have replicated the error but it only happens in the case of new companies created, it does not happen with the demo companies already defined in odoo. I am still investigating the error.

Hi, Can you please confirm the user that you are using in the shell?

pilarvargas-tecnativa commented 1 month ago

@amkarthik Actually, the access rule to the ‘product.product’ model was not being applied and it is necessary to do it as it was done in v13 and v14. This same error already occurs in v15 where this part of the code has been removed. This error should no longer appear and I have added the corresponding unit tests so that it does not happen again. Thanks

carolinafernandez-tecnativa commented 1 month ago

Please check CI, still having problems with multi-company rules, thanks!

amkarthik commented 1 month ago

@amkarthik Actually, the access rule to the ‘product.product’ model was not being applied and it is necessary to do it as it was done in v13 and v14. This same error already occurs in v15 where this part of the code has been removed. This error should no longer appear and I have added the corresponding unit tests so that it does not happen again. Thanks

Thanks

carolinafernandez-tecnativa commented 1 month ago

With these changes, when creating new companies and accessing with created users to product variant the error seems to disappear. I also have checked accessing in product template and now it seems to work fine, Thanks !

OCA-git-bot commented 1 month ago

On my way to merge this fine PR! Prepared branch 16.0-ocabot-merge-pr-628-by-pedrobaeza-bump-nobump, awaiting test results.

OCA-git-bot commented 1 month ago

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

cyrilmanuel commented 1 week ago

Hello @pedrobaeza, could you merge this PR ?