Issue with account combinations - always ask if a new account combination should be created

84 views
Skip to first unread message

Nicolas Micoud

unread,
May 2, 2018, 6:57:39 AM5/2/18
to iDempiere
Hi,

Steps to reproduce :

open BPartner / Customer Accounting :

 on Customer Receivables, create a new combination (eg *-21510) and use it.
 
 Then, on Customer Prepayment, open the dialog box and select same values (Org=* and Account=21510).
 When clicking on OK button, a popup will ask if we want to create a new combination. It shouldn't as it already exists.
 In this case, it should only close the dialog box and update the content of the Customer Prepayment field.
 
 
 Not sure about the best way to deal with it.
 
 Maybe add a check on the : onEvent / ok part ; something like that :
 
 if (needconfirm) {
 
   
// Check if the combination already exists (see action_Save ; where comment is "Check if already exists")
   
// if (MAccount.get(<all dimensions from dialog>) == null {
   
       
FDialog.ask(m_WindowNo, this, "CreateNewAccountCombination?", new Callback<Boolean>() {
       
       
}

   
}
 
}


  It would need to create a new method 'exists' which will be used in action_Save and here.
 
 WDYT ?

Nicolas

Carlos Antonio Ruiz Gomez

unread,
May 2, 2018, 7:24:44 AM5/2/18
to idem...@googlegroups.com
Hi Nicolas, are you using the new preference "Use Similar To" instead of LIKE?

Testing your scenario I just found a bug there - using LIKE seems to work without problem.

Regards,

Carlos Ruiz

Nicolas Micoud

unread,
May 2, 2018, 7:42:07 AM5/2/18
to iDempiere
Hi Carlos,

I reproduce it on test.idempiere.org this morning (before your commit) and on my instance (Oracle), i use an idempiere version of november 2017 (before integration of https://idempiere.atlassian.net/browse/IDEMPIERE-1906).
Bug is still on test.idempiere.org (see attached screenshots) :

 - 1 : window





 - 2 : dialog open and udpate account (13100 to 21510), then click on save - it should not as the combination already exists




Or I miss something ?
Auto Generated Inline Image 1
Auto Generated Inline Image 2

Carlos Antonio Ruiz Gomez

unread,
May 2, 2018, 7:55:17 AM5/2/18
to idem...@googlegroups.com
I just committed a fix, is not still on the test servers.
https://bitbucket.org/idempiere/idempiere/commits/b8352a6

Tested on postgresql



Am 02.05.2018 um 13:42 schrieb Nicolas Micoud:
Hi Carlos,

I reproduce it on test.idempiere.org this morning (before your commit) and on my instance (Oracle), i use an idempiere version of november 2017 (before integration of https://idempiere.atlassian.net/browse/IDEMPIERE-1906).
Bug is still on test.idempiere.org (see attached screenshots) :

 - 1 : window





 - 2 : dialog open and udpate account (13100 to 21510), then click on save - it should not as the combination already exists




Nicolas Micoud

unread,
May 2, 2018, 8:14:16 AM5/2/18
to iDempiere
AFAIU, the patch will fix postgresql, but not Oracle, right ?

Carlos Antonio Ruiz Gomez

unread,
May 2, 2018, 8:30:42 AM5/2/18
to idem...@googlegroups.com
I don't know - I don't have oracle local to test.

Nicolas Micoud

unread,
May 2, 2018, 8:47:44 AM5/2/18
to iDempiere
I will check but issue is still there on the WAccountDialog.

(your patch "only" improve the search before dialog box opens)

Eg: if you make a mistake when writing the Alias or the combination, the dialog will open and there, if you set correct Org and account, it will still ask is it should create new combination

Nicolas Micoud

unread,
May 2, 2018, 9:18:32 AM5/2/18
to iDempiere
I can't remember the logic we use when implementing this :-/

We check values from dialog box with combination from the field of the tab (combiOrg).
If there at least one difference, we ask if we need to create a new combination.

Whereas if user has selected values from an already existing combination, then we should use it directly, without prompting anything.

Carlos Antonio Ruiz Gómez

unread,
May 3, 2018, 6:05:57 AM5/3/18
to iDempiere
Reply all
Reply to author
Forward
0 new messages