Search in sources :

Example 1 with WPAttributeInstance

use of org.adempiere.webui.window.WPAttributeInstance in project adempiere by adempiere.

the class WMRPDetailed method selectAttributeSetInstance.

private void selectAttributeSetInstance() {
    //getM_Warehouse_ID();
    int m_warehouse_id = 0;
    //getM_Product_ID();
    int m_product_id = 0;
    if (m_product_id <= 0)
        return;
    MProduct product = MProduct.get(getCtx(), m_product_id);
    MWarehouse wh = MWarehouse.get(getCtx(), m_warehouse_id);
    String title = product.get_Translation(MProduct.COLUMNNAME_Name) + " - " + wh.get_Translation(MWarehouse.COLUMNNAME_Name);
    WPAttributeInstance pai = new WPAttributeInstance(title, m_warehouse_id, 0, m_product_id, 0);
    if (pai.getM_AttributeSetInstance_ID() != -1) {
        fAttrSetInstance_ID.setLabel(pai.getM_AttributeSetInstanceName());
        ASI_ID = new Integer(pai.getM_AttributeSetInstance_ID());
    } else {
        ASI_ID = 0;
    }
}
Also used : MProduct(org.compiere.model.MProduct) WPAttributeInstance(org.adempiere.webui.window.WPAttributeInstance) MWarehouse(org.compiere.model.MWarehouse)

Aggregations

WPAttributeInstance (org.adempiere.webui.window.WPAttributeInstance)1 MProduct (org.compiere.model.MProduct)1 MWarehouse (org.compiere.model.MWarehouse)1