Community mailing list archives

community@mail.odoo.com

Re: [multicompany context] Partner Access problem and possible module to fix bugs

by
Eric Caudal
- 08/25/2015 19:55:15
We faced a similar problem in v7 for salesmen in partner and we ended with a solution where we add to make the salesman a multi-company property.
Indeed when the salesman was changing company we add an access error in the partner.

On Wed, Aug 26, 2015 at 4:17 AM Pedro Manuel Baeza Romero <pedro.baeza@gmail.com> wrote:
Well, I will call it collateral damage instead of side effect if it's to avoid an error ;)

Anyways, users will be probably filtered out if the partner doesn't have customer nor supplier flags. Why don't you propose anyway to Odoo and debate with them?

Regards.

2015-08-25 22:09 GMT+02:00 Sylvain LE GAL <sylvain.legal@grap.coop>:
If you remove company_id from a partner, it will be visible by all the users in all company.

Not sure that it's a desired behaviour. In many multi company implementation, I guess It will not.

Sylvain LE GAL
Service informatique
GRAP - Groupement Régional Alimentaire de Proximité

3 Grande rue des Feuillants, 69001 Lyon
Bureau :
(+33) 09.72.32.33.17
Astreinte :
(+33) 06.81.85.61.43

GRAP sur le Web : Site Web | Facebook | Twitter
GRAP - service Informatique sur le Web : Twitter


2015-08-25 21:44 GMT+02:00 Pedro Manuel Baeza Romero <pedro.baeza@gmail.com>:
I don't think that there's any side effect. Can you tell me one?

Regards.
2015-08-25 21:38 GMT+02:00 Sylvain LE GAL <sylvain.legal@grap.coop>:
Hi,

Sorry if I didnt' explain correctly what my module did.
In fact my module removes company_id from partners.
(AND disable partners, to avoid users to see partners they did'nt created.)
Ok to propose a patch again V9, but not before, because it changes behaviour and could have unwished side effects.

Regards.

Sylvain LE GAL


Service informatique
GRAP - Groupement Régional Alimentaire de Proximité

3 Grande rue des Feuillants, 69001 Lyon
Bureau :
(+33) 09.72.32.33.17
Astreinte :
(+33) 06.81.85.61.43

GRAP sur le Web : Site Web | Facebook | Twitter
GRAP - service Informatique sur le Web : Twitter

2015-08-25 21:13 GMT+02:00 Pedro Manuel Baeza Romero <pedro.baeza@gmail.com>:
I also faced this problem, but a better solution is to let company_id of user partners empty, and should be proposed as OCB/Odoo patch I think.

Regards.
2015-08-25 15:23 GMT+02:00 Sylvain LE GAL <sylvain.legal@grap.coop>:
Hi all,

I faced to a right access problem in multicompany context, concerning partners created when creating users. (because 'res.users' inherit from 'res.partner').

The associated partner will have the company_id of the user. So the partner will be visible in this company, and can be used. (for a sale for example, etc..). But, if the user change his company, Odoo will change the company_id of the partner and so, the partner will be unreachable, generating access bug.

I don't know if it's a bug or a feature, but It's not a good behaviour in my case.

I so created a little module that disable all 'users' partners and remove 'company_id' on them. So :
-> those "special partners" are not available ;
-> there is no Access right bug ;

If you're interested by this module, I can share it in OCA. (I guess here : https://github.com/OCA/partner-contact)

This is in V7, but i'll port it in V8 in a while.

(Suggestion / remarks / review are welcome)

Kind regards.

Sylvain LE GAL
Service informatique
GRAP - Groupement Régional Alimentaire de Proximité

3 Grande rue des Feuillants, 69001 Lyon
Bureau :
(+33) 09.72.32.33.17
Astreinte :
(+33) 06.81.85.61.43

GRAP sur le Web : Site Web | Facebook | Twitter
GRAP - service Informatique sur le Web : Twitter

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

--

Eric  Caudal (from my mobile)