Display content of AD_ChangeLog for records on tables where ID is not Tablename + _ID

54 views
Skip to first unread message

Nicolas Micoud

unread,
May 27, 2020, 7:49:24 AM5/27/20
to iDempiere
Hi,

I always thought that ChangeLog feature was not enabled for tables where ID was not Tablename + _ID (ie AD_OrgInfo).
In fact, is just the WRecordInfo panel that do not show the records because the Record_ID is not set.

Can you (Carlos ?) have a look at the attached patch (v6.2) and tell me if you agree with the approach ?
If so, I'll do a pull request on v7.

Idea is to load the Record_ID before tabName.
Thus, is the Record_ID is still equals to -1, then the program will search it while retrieving tabName.

Thanks,

Nicolas
WRecordInfo.java.patch

Carlos Antonio Ruiz Gómez

unread,
May 30, 2020, 9:19:13 AM5/30/20
to iDempiere

Carlos Antonio Ruiz Gomez

unread,
May 30, 2020, 11:12:03 AM5/30/20
to idem...@googlegroups.com
Hi Nicolas,

I don't understand, the patch is in WRecordInfo to show change log, but
I made some tests and the related tables are not being logged - even
when turning on the "Maintain Change Log" flag.


The potential tables that are on this set are:
AD_ClientInfo
AD_OrgInfo
AD_Ref_Table
C_AcctSchema_Default
C_AcctSchema_GL

These two tables are not candidates because:
M_TransactionAllocation - not used
A_RegistrationProduct - allows multiple records in children


If the change log is not saved, doesn't make sense to change code to
show change log.

Regards,

Carlos Ruiz



El 27/05/20 a las 9:49 a. m., Nicolas Micoud escribió:

Nicolas Micoud

unread,
Jun 1, 2020, 5:23:15 AM6/1/20
to iDempiere
Hi Carlos,

Well... is really weird because :



I got records in AD_ChangeLog, linked to AD_OrgInfo - and I haven't done changes on related classes :-/
I may need to do some debugs in order to find out why this is happening

Thanks,

Nicolas

Carlos Antonio Ruiz Gomez

unread,
Jun 1, 2020, 10:46:25 AM6/1/20
to idem...@googlegroups.com
Hi Nicolas, you're right - the records are created correctly.

I tested your patch on WRecordInfo and is not showing results.

Regards,

Carlos Ruiz



El 1/06/20 a las 7:23 a. m., Nicolas Micoud escribió:

Nicolas Micoud

unread,
Jun 1, 2020, 12:05:42 PM6/1/20
to iDempiere
Hi Carlos,

Patch has been created on 6.2 ; as WRecordInfo is slighty different between 6.2/7.1, that's may explain why you didn't see them ?

And, just to be sure (it can happen to the best ^^) ; are there records to be shown ?

Anyway, is the idea ok for you ?
-> get the RecordID before the tabName ; and if RecordID is still equals to -1, try to get it while in the retrieving of tabName

Also, do you know when the
if (dse.getSource() instanceof GridTab)
is true ?

Can it be a Swing-legacy stuff ?


Thanks,

Nicolas

Carlos Antonio Ruiz Gomez

unread,
Jun 1, 2020, 1:07:43 PM6/1/20
to idem...@googlegroups.com
xref


El 1/06/20 a las 2:05 p. m., Nicolas Micoud escribió:
Reply all
Reply to author
Forward
0 new messages