Help

7

multiple addresses, emails, phone numbers and companies assigned to a customer

Avatar
Jakub Krzempek

I'm looking for a possibility to add multiple emails, phone numbers and addresses to one customer/company. I know it is possible by adding another contact in a 'contact' tab, but - honestly - I'd prefer not to, as it creates another contacts in the customer views (which becomes overwhelming eventually). Ideally, the customer view should have a button to add another address/phone/email and store that data in the database. Also, I'd love to assign one persona-partner to multiple company-partner, hence create many2many relationship in res.partner's parent_id. Now it's only a one-way ticket.

I am wondering here if such a module(s) giving these abilities is somewhere around (I had no luck trying to find one... :( ). If not, I imagine that can be achieved by altering the res.parner's table structure. Adding additional fields, like x_phone2, x_email2 etc. seems to be the easiest solution, but I don't know how much e.g. emails I will have to store in the db. Hence my another question: what would be a rule of thumb to transfer the given fields into the arrays, resize them, and accessing if needed? :)

I can provide you with more details if something is unclear or too blurry. ^^

4 Comments
Avatar
Discard
Avatar
George Rodopoulos
-

I also have some contacts with a secondary email. If anybody has any hint on how to achieve adding a secondary address, please post it here.

Avatar
Jeff Beidler
-

+1. I don't want to add new people (contacts) to a company, I need to have a default (corporate) address and a remit-to (payable) address.

Avatar
Ermin Trevisan
-

+1. I would like to have different addresses, also with different functions, such as domicile address, shop address, office address etc.

Avatar
john5000
-

Like others mentioned above, I am familiar with adding contacts to a company, which didn't seem like a "solution". But Ray Carnes points out of way of using it that so can have "shipping address", "Billing address", etc. See: https://www.odoo.com/forum/help-1/question/how-to-manage-private-persons-customers-with-multiple-addresses-in-openerp-7-40153

5 Answers
3
Best Answer

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"/>
                                    </tree>
                                </field>
                            </page>

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.

Avatar
Discard
2
Avatar
gunnar
Best Answer

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.

Avatar
Discard
1
Avatar
Robert Rübner
Best Answer

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.

Avatar
Discard
0
Avatar
Herve GUERIN
Best Answer

Hi,

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 !

Avatar
Discard
0
Avatar
Philippe Thuaud
Best Answer

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.

Thanks

Avatar
Discard