"copy" of record and callouts

212 views
Skip to first unread message

Silvano Trinchero

unread,
Oct 14, 2015, 12:20:03 PM10/14/15
to iDempiere
Hi Community,
our customers report us wrong behaviors with the copy record operation (toolbar button on window):
when they copy a record, the result is not always equal to the original record.
The problem is caused by the fact that the copy operation triggers callout: for example, if I copy an order
that has a non-default partner location, the callout on business partner changes it back to the default one and so the new record is not a copy of the original record.

Since there may be a situation where callouts are wanted at copy, maybe a solution is to add a flag to the column (AD_Column record) to drive that behavior, similar to how isAllowCopy enables/disables the copy, with default to "don't trigger callouts on copy".

What do you think ?

Btw, this problem is also present in idempiere and so we are making a similar post on adempiere forums to gather more opinions.

Best regards,
Silvano

Rinto Exandi Sinaga

unread,
Oct 14, 2015, 8:53:17 PM10/14/15
to idem...@googlegroups.com

Hi,

Call out executed when changes occur on the related table field, my suggestion better to modify the callout to suite the operation rather than change the IsAllowCopy behaviour.

Rgds,
Rinto

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/def0f2c3-bd6e-40b2-a392-aaba7d35ea1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nicolas Micoud

unread,
Oct 15, 2015, 1:32:10 AM10/15/15
to iDempiere
Hi

Just my 2 cents, but you also can create a process or a new toolbar button that will copy exactly the record.

Regards,

Nicolas

Silvano Trinchero

unread,
Oct 15, 2015, 10:47:01 AM10/15/15
to iDempiere
Hi Rinto and Nicolas,

From Rinto post:

> the callout to suite the operation rather than change the IsAllowCopy behaviour.

Its not about a single callout, is about the general behavior at copy. Additionally, i dont think a callout has the information its being invoked as part of a copy operation.
I dont mean to change IsAllowCopy behaviour, but to add a new flag to select between 'trigger callouts on copy' and 'dont trigger'.

From Nicolas post:

> Just my 2 cents, but you also can create a process or a new toolbar button that will copy exactly the record.

Both are possible solutions, but not much user friendly. Imho, adding a new button will add more confusion then error-prevention: users are used to the old one, adding another will not prevent them from using the wrong button.

Thanks for the answers,
Sillvano

Carlos Antonio Ruiz Gomez

unread,
Oct 15, 2015, 11:29:05 AM10/15/15
to idem...@googlegroups.com
Hi Silvano, IMHO that's not a bug, is just a different point of view from your users.

Pushing the copy button does not create an exact copy of the actual record (and it must not - that's the reason of the IsAllowCopy flag added on iDempiere).

I think is important to trigger the callouts, i.e. suppose the partner location being copied is already obsolete and inactive because your customer moved to another location.

As Nicolas pointed, there could be technical possibilities to implement this, but I think is not good by default.

Regards,

Carlos Ruiz

Silvano Trinchero

unread,
Oct 15, 2015, 12:27:47 PM10/15/15
to iDempiere
Hi Carlos,
i understand your point of view about being or not a bug, IMHO from a user point of view is not surpising they expect a copy of the record when they perform a 'copy' operation.
Anyway, i do agree on your example: its possible that callout execution is wanted on some fields but not on others (in a similar way as the isallow can exclude fields), thats
why i was proposing the addition of a new field (named "IsAllowCalloutsOnCopy", for example).
I was thinking about having "dont trigger callouts" as the default behaviour, but that may be a bad idea: its propably better to have it default to the current behavior, and change it
(if needed) for a specific installation.

Thanks for the feedbacks,
Silvano

Carlos Antonio Ruiz Gomez

unread,
Oct 15, 2015, 12:34:21 PM10/15/15
to idem...@googlegroups.com
Another possibility you can explore is creating a WindowValidator for
the event WindowValidatorEventType.AFTER_COPY

Silvano Trinchero

unread,
Oct 16, 2015, 3:35:41 AM10/16/15
to iDempiere
This sounds interesting, but usually a validator "add" functionality, does not remove it (implementing the mentioned logic requires 'suppressing' the default behavior of triggering callouts).

Thanks for the advice,
Silvano

Pritesh Shah

unread,
Oct 16, 2015, 4:22:14 AM10/16/15
to iDempiere
Hello All,

This might something different than the topic in the group, but regarding the copy functionality. Is it possible to have Copy functionality copy child tabs records too, it difficult for end users when they copy the header and needs create child records manually.

Thanks,
Pritesh

redhuan d. oon

unread,
Oct 17, 2015, 1:30:54 PM10/17/15
to iDempiere
Hi Pritesh, this should be in a new thread :) but anyway you can 'save time a bit' this way http://wiki.idempiere.org/en/NF2.1_Tab_Selection_When_Exporting_CSV

Pritesh Shah

unread,
Oct 20, 2015, 6:08:48 AM10/20/15
to iDempiere
Thank You Redhuan for the link. I know new export in iDempiere allows to select the tab to export the data. Issue with CSV export is that it only allows to export 1st level child. Whereas this is a export functionality and copy functionality.
Reply all
Reply to author
Forward
0 new messages