Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

4

How to set up multiple companies for a single partner?

By
vim24
on 5/14/13, 7:34 PM 1,991 views

Say I have three companies; CompanyA ,CompanyB and CompanyC. CompanyA and CompanyB both deal with the same customer; CustomerX.

How can I set up CustomerX so that I can invoice him from CompanyA and CompanyB but NOT let him be seen by CompanyC? (That is, I can't just leave the company field blank or CompanyC will be able to see him).

3

Borni DHIFI

--Borni DHIFI--
5102
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 

http://www.linkedin.com/in/borni

Skype : dhifi.borni

Borni DHIFI
On 5/14/13, 8:26 PM

Hi,

for each partner you need to select a company or allow empty the company that the partner is visible to everyone.

So what I ask to create a virtual company V that contains all object coummun between company A and company B (partners , users, products...) . A and B are childs V.

and create another company C.

so company A and company B both deal with the same customer but not let him be seen by company C.

So your structure will :

image description


And if this solution does not meet your needs you have to do create a new module to change this logic .

you can start by see this line in res.partner:

'company_id': fields.many2one('res.company', 'Company', select=1),

change to :

'company_id': fields.many2many('res.company', id1='partner_id', id2='company_id', string='Company'),

and you will have many modificat.

Interesting solution, but I don't think it is practical for our large multi-company setup. While A and B share CustomerX, A and C might also share CustomerZ (and B does not). Then the structure shown above will not allow A and C to see CustomerZ without B also seeing them. This will only work as a solution for permissions on a single partner issue and is not very extendable

vim24
on 5/14/13, 9:17 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/14/13, 7:34 PM
Seen: 1991 times
Last updated: 3/16/15, 8:10 AM