IDEMPIERE-3481 Blank serial number even when serial number is mandatory
This commit is contained in:
parent
725c76c994
commit
dfa3855d19
|
@ -744,7 +744,7 @@ public class VPAttributeDialog extends CDialog
|
||||||
|
|
||||||
// *** Save Attributes ***
|
// *** Save Attributes ***
|
||||||
// New Instance
|
// New Instance
|
||||||
if (m_changed || m_masi.getM_AttributeSetInstance_ID() == 0)
|
if (mandatory.isEmpty() && (m_changed || m_masi.getM_AttributeSetInstance_ID() == 0))
|
||||||
{
|
{
|
||||||
m_masi.saveEx();
|
m_masi.saveEx();
|
||||||
m_M_AttributeSetInstance_ID = m_masi.getM_AttributeSetInstance_ID ();
|
m_M_AttributeSetInstance_ID = m_masi.getM_AttributeSetInstance_ID ();
|
||||||
|
@ -785,8 +785,13 @@ public class VPAttributeDialog extends CDialog
|
||||||
m_changed = true;
|
m_changed = true;
|
||||||
} // for all attributes
|
} // for all attributes
|
||||||
|
|
||||||
|
if (mandatory.length() > 0)
|
||||||
|
{
|
||||||
|
ADialog.error(m_WindowNo, this, "FillMandatory", mandatory);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// Save Model
|
// Save Model
|
||||||
if (m_changed)
|
else if (m_changed)
|
||||||
{
|
{
|
||||||
m_masi.setDescription ();
|
m_masi.setDescription ();
|
||||||
m_masi.saveEx();
|
m_masi.saveEx();
|
||||||
|
@ -794,11 +799,6 @@ public class VPAttributeDialog extends CDialog
|
||||||
m_M_AttributeSetInstance_ID = m_masi.getM_AttributeSetInstance_ID ();
|
m_M_AttributeSetInstance_ID = m_masi.getM_AttributeSetInstance_ID ();
|
||||||
m_M_AttributeSetInstanceName = m_masi.getDescription();
|
m_M_AttributeSetInstanceName = m_masi.getDescription();
|
||||||
//
|
//
|
||||||
if (mandatory.length() > 0)
|
|
||||||
{
|
|
||||||
ADialog.error(m_WindowNo, this, "FillMandatory", mandatory);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
} // saveSelection
|
} // saveSelection
|
||||||
|
|
||||||
|
|
|
@ -977,7 +977,7 @@ public class WPAttributeDialog extends Window implements EventListener<Event>
|
||||||
|
|
||||||
// *** Save Attributes ***
|
// *** Save Attributes ***
|
||||||
// New Instance
|
// New Instance
|
||||||
if (m_changed || m_masi.getM_AttributeSetInstance_ID() == 0)
|
if (mandatory.isEmpty() && (m_changed || m_masi.getM_AttributeSetInstance_ID() == 0))
|
||||||
{
|
{
|
||||||
m_masi.saveEx();
|
m_masi.saveEx();
|
||||||
m_M_AttributeSetInstance_ID = m_masi.getM_AttributeSetInstance_ID ();
|
m_M_AttributeSetInstance_ID = m_masi.getM_AttributeSetInstance_ID ();
|
||||||
|
@ -1021,13 +1021,6 @@ public class WPAttributeDialog extends Window implements EventListener<Event>
|
||||||
}
|
}
|
||||||
m_changed = true;
|
m_changed = true;
|
||||||
} // for all attributes
|
} // for all attributes
|
||||||
|
|
||||||
// Save Model
|
|
||||||
if (m_changed)
|
|
||||||
{
|
|
||||||
m_masi.setDescription ();
|
|
||||||
m_masi.saveEx();
|
|
||||||
}
|
|
||||||
m_M_AttributeSetInstance_ID = m_masi.getM_AttributeSetInstance_ID ();
|
m_M_AttributeSetInstance_ID = m_masi.getM_AttributeSetInstance_ID ();
|
||||||
m_M_AttributeSetInstanceName = m_masi.getDescription();
|
m_M_AttributeSetInstanceName = m_masi.getDescription();
|
||||||
//
|
//
|
||||||
|
@ -1036,6 +1029,12 @@ public class WPAttributeDialog extends Window implements EventListener<Event>
|
||||||
FDialog.error(m_WindowNo, this, "FillMandatory", mandatory);
|
FDialog.error(m_WindowNo, this, "FillMandatory", mandatory);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// Save Model
|
||||||
|
else if (m_changed)
|
||||||
|
{
|
||||||
|
m_masi.setDescription ();
|
||||||
|
m_masi.saveEx();
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
} // saveSelection
|
} // saveSelection
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue