From edbcd9d83ba09b6d79c7cbd414f4582ed41838c3 Mon Sep 17 00:00:00 2001 From: hieplq Date: Wed, 11 Dec 2013 16:51:42 +0700 Subject: [PATCH] IDEMPIERE-1622 - NPE when switch field in "receipt create lines from" --- .../adempiere/webui/apps/form/WCreateFromShipmentUI.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java index 1fd2d334a0..58aea64731 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java @@ -367,7 +367,11 @@ public class WCreateFromShipmentUI extends CreateFromShipment implements EventLi // BPartner - load Order/Invoice/Shipment if (e.getPropertyName().equals("C_BPartner_ID")) { - int C_BPartner_ID = ((Integer)e.getNewValue()).intValue(); + int C_BPartner_ID = 0; + if (e.getNewValue() != null){ + C_BPartner_ID = ((Integer)e.getNewValue()).intValue(); + } + initBPOrderDetails (C_BPartner_ID, true); } window.tableChanged(null);