[MIG][19.0] partner_multi_company#901
Conversation
84a5fc3 to
bd9ceef
Compare
|
Hi, check this for dependency: https://github.com/OCA/maintainer-tools/wiki/Use-temporary-reference%28s%29-to-another-pull-request%28s%29 |
|
@Vandan-Pandeji-SerpentCS I opened a PR to your branch: Vandan-Pandeji-SerpentCS#1 |
|
Hi @Vandan-Pandeji-SerpentCS! Could you handle the requests and rebase for run runboat? Thank you @astirpe I don't think he'll reply, it's been two months since you wrote to him. Perhaps, you could add the commit history to your PR and supersed this one if it still doesn't respond . What do you think? |
@EmilioPascual I'll take a look at this week & update you. |
This fix prevents errors when there are other tests that create partners and base_suspend_security is still not ready. There can be still problems if these partners are not created with SUPERUSER.
* Bump versions * Rename manifest * Rename openerp to odoo * Implement base_multi_company Add depends Swap dependencies Add base_suspend_security depend back & server-tools repo Fix tests Add test for partner._commercial_fields Why not both?!
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: multi-company-11.0/multi-company-11.0-partner_multi_company Translate-URL: https://translation.odoo-community.org/projects/multi-company-11-0/multi-company-11-0-partner_multi_company/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: multi-company-12.0/multi-company-12.0-partner_multi_company Translate-URL: https://translation.odoo-community.org/projects/multi-company-12-0/multi-company-12-0-partner_multi_company/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: multi-company-12.0/multi-company-12.0-partner_multi_company Translate-URL: https://translation.odoo-community.org/projects/multi-company-12-0/multi-company-12-0-partner_multi_company/
… partner companies
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: multi-company-17.0/multi-company-17.0-partner_multi_company Translate-URL: https://translation.odoo-community.org/projects/multi-company-17-0/multi-company-17-0-partner_multi_company/
Currently translated at 100.0% (6 of 6 strings) Translation: multi-company-17.0/multi-company-17.0-partner_multi_company Translate-URL: https://translation.odoo-community.org/projects/multi-company-17-0/multi-company-17-0-partner_multi_company/it/
In the partner_multi_company module, the display_name field had to be redefined as store and index because the module installation removed those field properties. As of v17 the field is no longer store so it is not necessary to redefine it as storable. In addition, this redefinition causes errors when printing reports because the field is not calculated when accessing and therefore only shows the data stored in the database, which is not updated until one of the fields of the dependency changes.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: multi-company-17.0/multi-company-17.0-partner_multi_company Translate-URL: https://translation.odoo-community.org/projects/multi-company-17-0/multi-company-17-0-partner_multi_company/
When a new company is created with user_ids, the update of the users in done only on cache level so the user's partner's company is not aligned. Propagate user default company Write on users triggers a write on the partners that validates the partners' companies, but partners' companies haven't been aligned yet so it raises the partner's companies constraint. Align the companies in the partners first, so that writing on users (and therefore on partners) will satisfy the constraint.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: multi-company-18.0/multi-company-18.0-partner_multi_company Translate-URL: https://translation.odoo-community.org/projects/multi-company-18-0/multi-company-18-0-partner_multi_company/
* [IMP][19.0] partner_multi_company: fix hook duplicate key error * [DON'T MERGE] test-requirements.txt * [DON'T MERGE] test-requirements.txt
2db1266 to
e57c364
Compare
Done. Please check now. |
EmilioPascual
left a comment
There was a problem hiding this comment.
Good job @Vandan-Pandeji-SerpentCS
Functional and code review.
fcvalgar
left a comment
There was a problem hiding this comment.
Great work, thanks for the contribution @Vandan-Pandeji-SerpentCS . I have reviewed the module and performed the following functional tests in a multi-company environment:
Test 1: OK - Global partner without companies assigned is visible from both companies.
Test 2: OK - Partner restricted to one company is only visible for users with access to that company.
Test 3: OK - Partner assigned to two companies is visible and usable from both companies.
Test 4: OK - When creating a partner, the current company is correctly proposed by default.
Test 5: OK - Removing all companies from a partner makes it available globally again.
Test 6: OK - It is not possible to remove from a user’s partner a company that is still assigned to the related user.
Test 7: OK - Adding a new allowed company to a user correctly updates the related partner companies.
Test 8: OK - Changing the user’s main company keeps the related partner company access consistent.
Test 9: OK - Child contacts correctly follow the commercial partner company configuration.
Test 10: OK - The known roadmap limitation about different companies on child contacts has been reviewed and behaves consistently with the current implementation.
Test 11: OK - After uninstalling the module, the standard partner company rule is restored.
Test 12: OK - Existing partners with a company assigned before installation are correctly migrated to the new multi-company field.
All tested scenarios worked as expected, so this PR looks good to me. Thank you again for the work.
BhaveshHeliconia
left a comment
There was a problem hiding this comment.
Code and functional review LGTM!
|
Hi @Vandan-Pandeji-SerpentCS, thanks for the migration! While running this port in a real multi-company deployment (Odoo 19, alongside the rest of the multi-company stack) we hit three issues you may want to fold into this PR. Fixes for all three, with regression tests, are on our fork and you're welcome to cherry-pick them:
Related: OCA/partner-contact#2401 fixes the Happy to open a PR against your branch instead if that's easier — just say the word. |
Depending Module: #889