OCA / cooperative

GNU Affero General Public License v3.0
11 stars 22 forks source link

[14.0][IMP] cooperator: subscription creates partners with company_id #121

Closed DaniilDigtyar closed 4 months ago

DaniilDigtyar commented 8 months ago

When the subscription.request creates a new res.partner it doesn't assign any company_id to the values so it is visible for all companies.

The model res.partner doesn't assign any company_id by default, so we should set it in cooperator.

DaniilDigtyar commented 8 months ago

9e9ccd42736bd37f162eeefaa539294085aecb46 I remove company_id in the test partner because when searching in the validation, it doesn't filter out the partners without the environment company in the _get_partner_domain() method.

We can fix this, but I understand that someone how is a cooperator in different cooperatives shares the same partner record between all of them, and it should be accessible for all companies by removing the company_id.

huguesdk commented 7 months ago

although it is possible to assign a company to a partner, it seems that since odoo 13.0, the company_id field is null by default, which means that partners are shared between companies. i think that cooperator should not change this behavior. if you need this, i think it would belong in a separate module.