IDEMPIERE-3180:form "create line from" on invoice window make NPE when clear BP field

This commit is contained in:
hieplq 2016-09-04 19:37:29 +07:00
parent 093c79943a
commit ebb6605287
1 changed files with 2 additions and 1 deletions

View File

@ -282,7 +282,8 @@ public class WCreateFromInvoiceUI extends CreateFromInvoice implements EventList
// BPartner - load Order/Invoice/Shipment
if (e.getPropertyName().equals("C_BPartner_ID"))
{
int C_BPartner_ID = ((Integer)e.getNewValue()).intValue();
Integer newBpValue = (Integer)e.getNewValue();
int C_BPartner_ID = newBpValue == null?0:newBpValue.intValue();
initBPOrderDetails (C_BPartner_ID, true);
}
window.tableChanged(null);