Odoo Help

9 Answers

Yenthe Van Ginneken

--Yenthe Van Ginneken--
| 8 8 10
--Yenthe Van Ginneken--

My Odoo blog: http://www.odoo.yenthevg.com/

My Twitter: https://twitter.com/Yenthe666

Yenthe Van Ginneken
11/20/14, 2:10 AM

There are a few options here. By default you won't be able to add multiple addresses, emails, phone numbers, .. to a customer but you could add this by code.

One option would be, as you said, to add new fields to the res.partner table and show these fields in the view. The problem here however is that you do not need how many you need and this option is not dynamic.
Your second option, and I believe the best if I understand you correct, is to add a new tab and program a many2many relation in your model. Create a many2many from the table res.partner and then show this new field in the view.
Your code would look something like this..

.py (model) file:

'x_extra_addresses': fields.many2many('res.partner', 'custom_model_name, 'field_name_1', 'field_name2', string="Extra addresses"),

.xml (view) file:

            <page string="Extra addresses">
                <label for="x_extra_addresses" string="Externe personen betrokken bij dit project"/>
                                <field name="x_extra_addresses">
                                    <tree string="yourTreeString">
                                        <field name="street"/>
                    <field name="city"/>
                    <field name="zip"/>

Which would give you a new tab that looks something along these lines:

Note: this code should fully work but I did not test this, this is just a sample and you will probably still need to tweak some minor things. It is just a concept, or a possible way.



| 6 7 8


3/4/15, 12:38 AM

I think the most elegant way would to write a Module that adds these additional information to res.partner instead of twaeking the base code. Maybe the code posted by Yenthe above could be used for such a Module.

Robert Rübner
4/13/16, 8:40 AM

We want to start to create a new module to add the possibility to handle multiple addresses, emails and phones per partner. If you are still interested feel free to participate at https://github.com/blooparksystems/partner/issues/1. Ideas, approaches, solutions are welcome.

9/7/17, 3:10 AM


I just found that : https://www.youtube.com/watch?v=vWJG3y2ZvSU

but it doesn't which odoo version it is based on ! : is it a new feature of odoo10 ?, otherwize I would be pleased to have the name of the module !

Philippe Thuaud
3/6/17, 4:55 AM

Hi Guys,

Is there any feedback on this?

I am looking at having this as well as we have many contacts with multiple email addresses and phone numbers.


Ask a Question
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.

Odoo Training Center

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

Test it now