From 0dd29367aef9bf1cb24b85e43ddf9ca50a5e1868 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 30 Sep 2013 21:29:23 -0500 Subject: [PATCH] IDEMPIERE-1404 Initial Client Setup creating shared location for org and warehouse --- org.adempiere.base/src/org/compiere/model/MSetup.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/model/MSetup.java b/org.adempiere.base/src/org/compiere/model/MSetup.java index 1713c1347c..e3254d7c47 100644 --- a/org.adempiere.base/src/org/compiere/model/MSetup.java +++ b/org.adempiere.base/src/org/compiere/model/MSetup.java @@ -1142,10 +1142,14 @@ public final class MSetup createPreference("C_Country_ID", String.valueOf(C_Country_ID), 0); // Default Warehouse + MLocation locwh = new MLocation(m_ctx, C_Country_ID, C_Region_ID, City, m_trx.getTrxName()); + locwh.setAddress1(address1); + locwh.setPostal(postal); + locwh.saveEx(); MWarehouse wh = new MWarehouse(m_ctx, 0, m_trx.getTrxName()); wh.setValue(defaultName); wh.setName(defaultName); - wh.setC_Location_ID(loc.getC_Location_ID()); + wh.setC_Location_ID(locwh.getC_Location_ID()); if (!wh.save()) log.log(Level.SEVERE, "Warehouse NOT inserted");