Odoo Help

3

Company under Company

By
Adrian
on 2/21/13, 8:19 AM 2,403 views

To my knowledge you can create a company as a customer and put another customer under it, for example as a contact holder.

But is it possible to put a company under another company?

3

Yes, it is possible!

On v6.x, it was possible to define a "parent partner" on the partner form view in the tab "Sales and Purchases". Technically, this field was called parent_id

On v7, this field is not there anymore, at least by default. With the developer mode, I looked at the fields available for the object Customer (res.partner) and parent_id is still there in the DB. So basically, you can make this field visible on the form view in v7 (with the view editor for example). I tested on runbot and it works. (For some reason, its default label is "Related Company" but you can change that to "Parent Company" if you want).

The result is that you can see companies within companies on the same level than their contacts. Here are some screenshots where Vicking Direct is the parent of Agrolait:

image description

 

image description

 

What Code did you use to make it appear?

Adrian
on 2/22/13, 5:07 AM

As I understood it, he edited the XML view from the view edition tools in OpenERP. However, I don't think it's a good idea to have related company in contacts tabs. As explained in my answer to my own question, I created a module for that:

how-do-we-set-a-hierarchy-for-partners

Camptocamp SA
on 2/22/13, 5:35 AM

Ahh found the code part it works!

Adrian
on 2/22/13, 5:54 AM

Yes, as Yannick said, I just edited the view from the view editor.

Fabrice Henrion (fhe)
on 2/22/13, 8:22 AM

Downvoted: as a partner, I certainly don't want to edit the view through the web in order to work around a regression for all customer installation I have to perform. The answer proposed in http://help.openerp.com/question/120/how-do-we-set-a-hierarchy-for-partners/ is much more suitable in this regard.

Camptocamp France SAS, Alexandre Fayolle - Camptocamp
on 3/7/13, 4:13 AM

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 2/21/13, 8:19 AM
Seen: 2403 times
Last updated: 3/16/15, 8:10 AM