Publication of module 'party_contact' for Tryton 3.0

52 views
Skip to first unread message

Christophe (net)

unread,
Jun 5, 2015, 3:14:32 AM6/5/15
to tryton-...@googlegroups.com
Hello

We have written a little module that modifies the use of parties and
addresses for :

- Adding of the possibility to define a default address on party
(this address does not need to show the name field)
- Adding the association between contact mechanism and addresses (on
an idea of Zikzakmedia)
- Help define the address of a contact is identical to the default
address of the party to avoid having to re-enter informations.

For now this module is only for version 3.0 of Tryton but we work to
porting it to other version.

The module is available on Gitlab
(https://gitlab.com/ate_modules/a4t-party_contact) and PyPI
(https://pypi.python.org/pypi/a4t-party_contact)

Regards
--
Christophe
http://adiczion.com

Cédric Krier

unread,
Jun 5, 2015, 6:45:03 AM6/5/15
to tryton-...@googlegroups.com
On 05 Jun 09:14, Christophe (net) wrote:
> Hello
>
> We have written a little module that modifies the use of parties and
> addresses for :
>
> - Adding of the possibility to define a default address on party (this
> address does not need to show the name field)

But there is already a default address on party (the first one).

> - Adding the association between contact mechanism and addresses (on an
> idea of Zikzakmedia)

I don't see the point to link for example an email to an address ?

> - Help define the address of a contact is identical to the default address
> of the party to avoid having to re-enter informations.
>

Are not you trying to reimplement the party_relationship module?

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Sergi Almacellas Abellana

unread,
Jun 5, 2015, 7:05:15 AM6/5/15
to tryton-...@googlegroups.com
El 05/06/15 a les 12:41, Cédric Krier ha escrit:
>> - Adding the association between contact mechanism and addresses (on an
>> >idea of Zikzakmedia)
> I don't see the point to link for example an email to an address ?
>
Neither do I. I guess the objective is to link the office phone with
it's relatted address.

--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

Jordi Esteve

unread,
Jun 5, 2015, 7:17:01 AM6/5/15
to tryton-...@googlegroups.com
On 05/06/15 12:41, Cédric Krier wrote:
>> - Adding the association between contact mechanism and addresses (on an
>> idea of Zikzakmedia)
> I don't see the point to link for example an email to an address ?

To know if an email/phone is related to an specific office/person or
they are for the whole party (generic contact mechanisms). Useful when a
party is a company with several offices or people.

--
Jordi Esteve
Consultor Zikzakmedia SL
jes...@zikzakmedia.com
Mòbil 679 170 693

Zikzakmedia SL
St. Jaume, 9, baixos, 2a
08720 Vilafranca del Penedès
Tel 93 890 2108

Cédric Krier

unread,
Jun 5, 2015, 7:25:02 AM6/5/15
to tryton-...@googlegroups.com
On 05 Jun 13:05, Sergi Almacellas Abellana wrote:
> El 05/06/15 a les 12:41, Cédric Krier ha escrit:
> >> - Adding the association between contact mechanism and addresses (on an
> >>>idea of Zikzakmedia)
> >I don't see the point to link for example an email to an address ?
> >
> Neither do I. I guess the objective is to link the office phone with it's
> relatted address.

But even today office phone are most of the time no more linked to a
static place thanks to the VOIP.

Cédric Krier

unread,
Jun 5, 2015, 8:05:03 AM6/5/15
to tryton-...@googlegroups.com
On 05 Jun 13:16, Jordi Esteve wrote:
> On 05/06/15 12:41, Cédric Krier wrote:
> >> - Adding the association between contact mechanism and addresses (on an
> >>idea of Zikzakmedia)
> >I don't see the point to link for example an email to an address ?
>
> To know if an email/phone is related to an specific office/person or they
> are for the whole party (generic contact mechanisms). Useful when a party is
> a company with several offices or people.

Wrong design contact mechanism is always for the party otherwise it must be on another party.

Raimon Esteve

unread,
Jun 5, 2015, 8:27:59 AM6/5/15
to tryton-...@googlegroups.com
2015-06-05 14:04 GMT+02:00 Cédric Krier <cedric...@b2ck.com>:
> On 05 Jun 13:16, Jordi Esteve wrote:
>> On 05/06/15 12:41, Cédric Krier wrote:
>> >> - Adding the association between contact mechanism and addresses (on an
>> >>idea of Zikzakmedia)
>> >I don't see the point to link for example an email to an address ?
>>
>> To know if an email/phone is related to an specific office/person or they
>> are for the whole party (generic contact mechanisms). Useful when a party is
>> a company with several offices or people.
>
> Wrong design contact mechanism is always for the party otherwise it must be on another party.

In a company, about email, maybe you have a general email:

he...@domain.com

But you could have:

inv...@domain.com -> related an invoice address
ware...@domain.com -> related a delivery address
wareh...@domain.com -> related to other delivery address

Or by cities:

b...@domain.com
gir...@domain.com
lle...@domain.com

and finally, you could add personal contact mechanisms.

Same other type contact mechanisms.

Christophe (net)

unread,
Jun 5, 2015, 8:47:04 AM6/5/15
to tryton-...@googlegroups.com
Le 05/06/2015 12:41, Cédric Krier a écrit :
> On 05 Jun 09:14, Christophe (net) wrote:
>> Hello
>>
>> We have written a little module that modifies the use of parties and
>> addresses for :
>>
>> - Adding of the possibility to define a default address on party (this
>> address does not need to show the name field)
>
> But there is already a default address on party (the first one).

this module removes the ambiguity (nothing differentiates the first
address of the other if not its position) and especially specifies that
the other person addresses are identical to the primary address.

>
>> - Adding the association between contact mechanism and addresses (on an
>> idea of Zikzakmedia)
>
> I don't see the point to link for example an email to an address ?

Not necessarily has an address but a person (name) who may have a
different address or not the main address.

>
>> - Help define the address of a contact is identical to the default address
>> of the party to avoid having to re-enter informations.
>>
>
> Are not you trying to reimplement the party_relationship module?

Not the relationship between the party, but the relationship between the
names, addresses and contacts mecanisms.

--
Christophe
http://adiczion.com

Jesús Martín Jiménez

unread,
Jun 5, 2015, 9:20:48 AM6/5/15
to tryton-...@googlegroups.com
2015-06-05 14:04 GMT+02:00 Cédric Krier <cedric...@b2ck.com>:
On 05 Jun 13:16, Jordi Esteve wrote:
> On 05/06/15 12:41, Cédric Krier wrote:
> >>   - Adding the association between contact mechanism and addresses (on an
> >>idea of Zikzakmedia)
> >I don't see the point to link for example an email to an address ?
>
> To know if an email/phone is related to an specific office/person or they
> are for the whole party (generic contact mechanisms). Useful when a party is
> a company with several offices or people.

Wrong design contact mechanism is always for the party otherwise it must be on another party.

Imagine you have a party with several addresses. Each address has its own phone number. Now you call him to the firts phone number and there, they say to you he is not there but in the beach shop. You have in your database both, the phone number and the address of the beach shop. If you don't have this relationship, how can you know which is the phone of the beach shop?
 

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/



--

Jesús Martín

Zikzakmedia SL
C/ de Sant Jaume, 9, baixos, 2ª
08720 Vilafranca del Penedès
☏ 93 890 21 08

Cédric Krier

unread,
Jun 5, 2015, 10:30:03 AM6/5/15
to tryton-...@googlegroups.com
On 05 Jun 14:27, Raimon Esteve wrote:
> 2015-06-05 14:04 GMT+02:00 Cédric Krier <cedric...@b2ck.com>:
> > On 05 Jun 13:16, Jordi Esteve wrote:
> >> On 05/06/15 12:41, Cédric Krier wrote:
> >> >> - Adding the association between contact mechanism and addresses (on an
> >> >>idea of Zikzakmedia)
> >> >I don't see the point to link for example an email to an address ?
> >>
> >> To know if an email/phone is related to an specific office/person or they
> >> are for the whole party (generic contact mechanisms). Useful when a party is
> >> a company with several offices or people.
> >
> > Wrong design contact mechanism is always for the party otherwise it must be on another party.
>
> In a company, about email, maybe you have a general email:
>
> he...@domain.com
>
> But you could have:
>
> inv...@domain.com -> related an invoice address
> ware...@domain.com -> related a delivery address
> wareh...@domain.com -> related to other delivery address

Are you kidding?

> Or by cities:
>
> b...@domain.com
> gir...@domain.com
> lle...@domain.com
>
> and finally, you could add personal contact mechanisms.
>
> Same other type contact mechanisms.
>

Cédric Krier

unread,
Jun 5, 2015, 10:30:03 AM6/5/15
to tryton-...@googlegroups.com
On 05 Jun 15:20, Jesús Martín Jiménez wrote:
> 2015-06-05 14:04 GMT+02:00 Cédric Krier <cedric...@b2ck.com>:
>
> > On 05 Jun 13:16, Jordi Esteve wrote:
> > > On 05/06/15 12:41, Cédric Krier wrote:
> > > >> - Adding the association between contact mechanism and addresses
> > (on an
> > > >>idea of Zikzakmedia)
> > > >I don't see the point to link for example an email to an address ?
> > >
> > > To know if an email/phone is related to an specific office/person or they
> > > are for the whole party (generic contact mechanisms). Useful when a
> > party is
> > > a company with several offices or people.
> >
> > Wrong design contact mechanism is always for the party otherwise it must
> > be on another party.
> >
>
> Imagine you have a party with several addresses. Each address has its own
> phone number. Now you call him to the firts phone number and there, they
> say to you he is not there but in the beach shop. You have in your database
> both, the phone number and the address of the beach shop. If you don't have
> this relationship, how can you know which is the phone of the beach shop?

False justification for introducing a weird loop in the database schema.
You have a comment field on contact mechanism if you want to store some
extra information about contact mechanism.

Cédric Krier

unread,
Jun 5, 2015, 10:35:37 AM6/5/15
to tryton-...@googlegroups.com
On 05 Jun 14:46, Christophe (net) wrote:
> Le 05/06/2015 12:41, Cédric Krier a écrit :
> >On 05 Jun 09:14, Christophe (net) wrote:
> >>Hello
> >>
> >>We have written a little module that modifies the use of parties and
> >>addresses for :
> >>
> >> - Adding of the possibility to define a default address on party (this
> >>address does not need to show the name field)
> >
> >But there is already a default address on party (the first one).
>
> this module removes the ambiguity (nothing differentiates the first address
> of the other if not its position) and especially specifies that the other
> person addresses are identical to the primary address.

Ordering for prioritisation is one of the biggest design principal of
Tryton. If you don't accept it, you will have to write a lot of modules
because it is everywhere.

> >> - Adding the association between contact mechanism and addresses (on an
> >>idea of Zikzakmedia)
> >
> >I don't see the point to link for example an email to an address ?
>
> Not necessarily has an address but a person (name) who may have a different
> address or not the main address.

A person is a party not a contact mechanism.

> >> - Help define the address of a contact is identical to the default address
> >>of the party to avoid having to re-enter informations.
> >>
> >
> >Are not you trying to reimplement the party_relationship module?
>
> Not the relationship between the party, but the relationship between the
> names, addresses and contacts mecanisms.

What names?
And there are no relation between addresses and contact mechanisms.

Raimon Esteve

unread,
Jun 5, 2015, 10:37:57 AM6/5/15
to tryton-...@googlegroups.com
2015-06-05 16:25 GMT+02:00 Cédric Krier <cedric...@b2ck.com>:
> On 05 Jun 14:27, Raimon Esteve wrote:
>> 2015-06-05 14:04 GMT+02:00 Cédric Krier <cedric...@b2ck.com>:
>> > On 05 Jun 13:16, Jordi Esteve wrote:
>> >> On 05/06/15 12:41, Cédric Krier wrote:
>> >> >> - Adding the association between contact mechanism and addresses (on an
>> >> >>idea of Zikzakmedia)
>> >> >I don't see the point to link for example an email to an address ?
>> >>
>> >> To know if an email/phone is related to an specific office/person or they
>> >> are for the whole party (generic contact mechanisms). Useful when a party is
>> >> a company with several offices or people.
>> >
>> > Wrong design contact mechanism is always for the party otherwise it must be on another party.
>>
>> In a company, about email, maybe you have a general email:
>>
>> he...@domain.com
>>
>> But you could have:
>>
>> inv...@domain.com -> related an invoice address
>> ware...@domain.com -> related a delivery address
>> wareh...@domain.com -> related to other delivery address
>
> Are you kidding?

Yes, It's Friday ;)

But about this topic, some people explain the reason relate contacts
mechanisms to address. You are free.

Christophe (net)

unread,
Jun 5, 2015, 1:52:11 PM6/5/15
to tryton-...@googlegroups.com
Le 05/06/2015 16:30, Cédric Krier a écrit :
> On 05 Jun 14:46, Christophe (net) wrote:
>> Le 05/06/2015 12:41, Cédric Krier a écrit :
>>> On 05 Jun 09:14, Christophe (net) wrote:
>>>> Hello
>>>>
>>>> We have written a little module that modifies the use of parties and
>>>> addresses for :
>>>>
>>>> - Adding of the possibility to define a default address on party (this
>>>> address does not need to show the name field)
>>>
>>> But there is already a default address on party (the first one).
>>
>> this module removes the ambiguity (nothing differentiates the first address
>> of the other if not its position) and especially specifies that the other
>> person addresses are identical to the primary address.
>
> Ordering for prioritisation is one of the biggest design principal of
> Tryton. If you don't accept it, you will have to write a lot of modules
> because it is everywhere.
>
>>>> - Adding the association between contact mechanism and addresses (on an
>>>> idea of Zikzakmedia)
>>>
>>> I don't see the point to link for example an email to an address ?
>>
>> Not necessarily has an address but a person (name) who may have a different
>> address or not the main address.
>
> A person is a party not a contact mechanism.

These remarks puzzled me, because I thought the name of the address
fields represented the person's name at this address, but I see in the
doc that I was wrong.
How you represent:
- Your employees?
- The various contacts of a company?
- Companies and their subsidiaries?
and after that how you easily find the information:
- A contact owned a company?
- All of a company contacts?
and how to send you a quote to a specific contact from the organization?

>
>>>> - Help define the address of a contact is identical to the default address
>>>> of the party to avoid having to re-enter informations.
>>>>
>>>
>>> Are not you trying to reimplement the party_relationship module?
>>
>> Not the relationship between the party, but the relationship between the
>> names, addresses and contacts mecanisms.
>
> What names?
> And there are no relation between addresses and contact mechanisms.
>
>

--
Christophe
http://adiczion.com

Cédric Krier

unread,
Jun 6, 2015, 2:45:03 AM6/6/15
to tryton-...@googlegroups.com
They are parties linked to the company thanks to company.employee Model.

> - The various contacts of a company?

Parties with a relation (from party_relationship) to the company (also a
party).

> - Companies and their subsidiaries?

Idem but with a different kind relation

> and after that how you easily find the information:
> - A contact owned a company?

On the party form, there is a list of all relations.

> - All of a company contacts?

Idem as party_relationship create the reverse link automatically.

> and how to send you a quote to a specific contact from the organization?

For now, there is no module that addresses this need.
For me, we are missing in the std modules one that will add a contact
field (M2O to party.party) on the sale, sale_opportunity and purchase.
This field should have a domain that will restrict the selectable party
to some specific relations of the main party.

Albert Cervera i Areny

unread,
Jun 6, 2015, 5:21:19 AM6/6/15
to tryton-...@googlegroups.com
We've got sale_contact, sale_opportunity_contact,
account_invoice_contact, purchase_contact and some others:

https://bitbucket.org/nantic/profile/repositories?search=contact

If there's interest we could work on pushing them to core.

>
> --
> Cédric Krier - B2CK SPRL
> Email/Jabber: cedric...@b2ck.com
> Tel: +32 472 54 46 59
> Website: http://www.b2ck.com/



--
Albert Cervera i Areny
Tel. 93 553 18 03
@albertnan
www.NaN-tic.com

Christophe (net)

unread,
Jun 6, 2015, 11:25:36 AM6/6/15
to tryton-...@googlegroups.com
Ok, how do I differentiate the company from their contacts (if, for
example, I want to do a mail to all companies)?
Should I add a flag (is a company for exemple) ?

--
Christophe
http://adiczion.com

Albert Cervera i Areny

unread,
Jun 6, 2015, 5:12:58 PM6/6/15
to Christophe (net), tryton-...@googlegroups.com
Yes. Categories are the usual way to distinguish this kind of things.

>
> --
> Christophe
> http://adiczion.com

Christophe (net)

unread,
Jun 7, 2015, 2:41:38 AM6/7/15
to Albert Cervera i Areny, tryton-...@googlegroups.com
But I saw (in a recent post) it is not easy to make search filter
combinations of categories, hence my question about the flag on the
party to let the 1st level research on category available. I know I have
not the best solution but is one and has the advantage of being simple.

--
Christophe
http://adiczion.com

Cédric Krier

unread,
Jun 7, 2015, 6:10:04 AM6/7/15
to tryton-...@googlegroups.com
Of course, but for me it doesn't make sense to have contact on invoice.
So I think a single module that adds contact field to opportunity, sale
and purchase will be welcomed (and maybe project).
Reply all
Reply to author
Forward
0 new messages