IDEMPIERE-2857 Improve transaction names for deletes / integrate peer reviewed patch from Nicolas Micoud (nmicoud) / IDEMPIERE-3416

This commit is contained in:
Carlos Ruiz 2018-07-09 21:33:18 +02:00
parent 91882dcb44
commit a9eb35a4c2
1 changed files with 5 additions and 2 deletions

View File

@ -2069,7 +2069,10 @@ public abstract class PO
l_trxname.setLength(23); l_trxname.setLength(23);
m_trxName = Trx.createTrxName(l_trxname.toString()); m_trxName = Trx.createTrxName(l_trxname.toString());
localTrx = Trx.get(m_trxName, true); localTrx = Trx.get(m_trxName, true);
localTrx.setDisplayName(getClass().getName()+"_save"); if (newRecord)
localTrx.setDisplayName(getClass().getName() + "_insert");
else
localTrx.setDisplayName(getClass().getName() + "_update_ID" + get_ID());
localTrx.getConnection(); localTrx.getConnection();
} }
else else
@ -3216,7 +3219,7 @@ public abstract class PO
{ {
localTrxName = Trx.createTrxName("POdel"); localTrxName = Trx.createTrxName("POdel");
localTrx = Trx.get(localTrxName, true); localTrx = Trx.get(localTrxName, true);
localTrx.setDisplayName(getClass().getName()+"_delete"); localTrx.setDisplayName(getClass().getName()+ "_delete_ID" + get_ID());
localTrx.getConnection(); localTrx.getConnection();
m_trxName = localTrxName; m_trxName = localTrxName;
} }