diff --git a/org.adempiere.base/src/org/compiere/model/MLocation.java b/org.adempiere.base/src/org/compiere/model/MLocation.java index 0bc10af293..1bfe166dc9 100644 --- a/org.adempiere.base/src/org/compiere/model/MLocation.java +++ b/org.adempiere.base/src/org/compiere/model/MLocation.java @@ -647,8 +647,8 @@ public class MLocation extends X_C_Location implements Comparator if (getC_City_ID() <= 0 && getCity() != null && getCity().length() > 0) { int city_id = DB.getSQLValue( get_TrxName(), - "SELECT C_City_ID FROM C_City WHERE C_Country_ID=? AND COALESCE(C_Region_ID,0)=? AND Name=?", - new Object[] {getC_Country_ID(), getC_Region_ID(), getCity()}); + "SELECT C_City_ID FROM C_City WHERE C_Country_ID=? AND COALESCE(C_Region_ID,0)=? AND Name=? AND AD_Client_ID IN (0,?)", + new Object[] {getC_Country_ID(), getC_Region_ID(), getCity(), getAD_Client_ID()}); if (city_id > 0) setC_City_ID(city_id); }