Recommended way to merge duplicate parties?

34 views
Skip to first unread message

Jon Levy

unread,
Sep 29, 2017, 5:41:39 PM9/29/17
to tryton
I see that OpenLabs and Nantic have developed versions of party-merge modules[1]. The Nantic one has been updated within about the last year[2]. However, Cedric also expressed concerns about the module. Does anyone have any recommendations for this?

I am migrating away from party_communication over to party_relationship, meaning that I am converting lots of addresses into parties, some of which will be duplicates.


[1] https://groups.google.com/forum/#!topic/tryton-contrib/42hnBzEfvPE
[2] https://bitbucket.org/nantic/trytond-party_merge

Thanks in advance for any guidance!

Jon

Cédric Krier

unread,
Sep 29, 2017, 6:05:07 PM9/29/17
to tryton
On 2017-09-29 14:41, Jon Levy wrote:
> I see that OpenLabs and Nantic have developed versions of party-merge
> modules[1]. The Nantic one has been updated within about the last
> year[2]. However, Cedric also expressed concerns about the module.
> Does anyone have any recommendations for this?

Since 4.2, there is a standard wizard PartyReplace in party module.

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

Jon Levy

unread,
Sep 30, 2017, 12:30:49 PM9/30/17
to tryton
On Friday, September 29, 2017 at 6:05:07 PM UTC-4, Cédric Krier wrote:

> Since 4.2, there is a standard wizard PartyReplace in party module.

Thank you for the information (and shame on me for being so far behind). I will look at the PartyReplace implementation and compare it to the OpenLabs/Nantic work to come up with a solution for me. Thanks again for all your feedback.

Jon Levy

unread,
Sep 30, 2017, 2:45:08 PM9/30/17
to tryton
On Friday, September 29, 2017 at 6:05:07 PM UTC-4, Cédric Krier wrote:
> Since 4.2, there is a standard wizard PartyReplace in party module.

To make sure I understand, it appears that PartyReplace only moves over the addresses and contact_mechanisms (the 'fields_to_replace'). I'm guessing the wizard is provided to do this because otherwise the write methods would prevent changes.

This leaves a lot of issues that would need to be resolved manually (eg re-pointing party relationships). I'm guessing you decided to stick with your point of view regarding the OpenLabs/Nantic version that "you don't have to change the referencial all over the place. You just have to deactivate the duplica[te]."[1]

Probably the OpenLabs/Nantic is better for my use case, where I am going to programmatically generate a bunch of parties at once, some of which are duplicates, and I want to consolidate the newly created party relationship when merging.

I take your point from [1] that merging can break history, so probably I should make sure that the only parties I merge out of existence are the ones I've just created (so they are not yet used in history elsewhere).

[1]https://groups.google.com/forum/#!topic/tryton-contrib/42hnBzEfvPE

Jon Levy

unread,
Sep 30, 2017, 4:21:52 PM9/30/17
to tryton
Now that I see the messy issues in merging parties better, I will avoid it by not creating those duplicates in the first place. Thanks for the help. No need for a response.

Cédric Krier

unread,
Sep 30, 2017, 5:15:07 PM9/30/17
to tryton
On 2017-09-30 11:45, Jon Levy wrote:
> On Friday, September 29, 2017 at 6:05:07 PM UTC-4, Cédric Krier wrote:
> > Since 4.2, there is a standard wizard PartyReplace in party module.
>
> To make sure I understand, it appears that PartyReplace only moves over the addresses and contact_mechanisms (the 'fields_to_replace'). I'm guessing the wizard is provided to do this because otherwise the write methods would prevent changes.
>
> This leaves a lot of issues that would need to be resolved manually (eg re-pointing party relationships). I'm guessing you decided to stick with your point of view regarding the OpenLabs/Nantic version that "you don't have to change the referencial all over the place. You just have to deactivate the duplica[te]."[1]

The reason why relations are not changed: https://bugs.tryton.org/msg29222
Reply all
Reply to author
Forward
0 new messages