IDEMPIERE-6039 MBPartnerLocation returning Location wrongly from cache when asked to requery (#2240)

This commit is contained in:
Carlos Ruiz 2024-02-13 07:47:01 +01:00
parent c23a3d8e5e
commit 16074d80ee
1 changed files with 3 additions and 1 deletions

View File

@ -195,12 +195,14 @@ public class MBPartnerLocation extends X_C_BPartner_Location {
/** /**
* Get Location/Address * Get Location/Address
* *
* @param requery get again the location from DB - please note that if used out of transaction the result is get from the cache * @param requery get again the location from DB
* @return location * @return location
*/ */
public MLocation getLocation(boolean requery) { public MLocation getLocation(boolean requery) {
if (requery || m_location == null) if (requery || m_location == null)
m_location = MLocation.getCopy(getCtx(), getC_Location_ID(), get_TrxName()); m_location = MLocation.getCopy(getCtx(), getC_Location_ID(), get_TrxName());
if (requery && m_location != null)
m_location.load(get_TrxName());
return m_location; return m_location;
} // getLocation } // getLocation