public static product_product aProductByDefaultCode(string defaultCode, Clients.clientOpenERP clientOERP, List <string> fieldsList, [email protected] context) { try { return((product_product)clientOERP.search(new IMDEV.OpenERP.models.query.aQuery("default_code", defaultCode), typeof(product_product), true, fieldsList, context)[0]); } catch { } return(null); }
public quality.comment_quality_formulator aCommentQualityFormulator(Clients.clientOpenERP clientOERP) { try { return((quality.comment_quality_formulator)clientOERP.search(new IMDEV.OpenERP.models.query.aQuery("partner_id", id), typeof(quality.comment_quality_formulator), true)[0]); } catch {} return(null); }
public static mrp_bom aBom(int numFormule, Clients.clientOpenERP clientOERP, List <string> fieldsList) { try { return((mrp_bom)clientOERP.search(new IMDEV.OpenERP.models.query.aQuery("num_formulateur", numFormule), typeof(mrp_bom), true, fieldsList)[0]); } catch { } return(null); }
public static account_tax aTax(int i, Clients.clientOpenERP clientOERP, [email protected] context) { List <object> result; result = clientOERP.search(new IMDEV.OpenERP.models.query.aQuery("id", i), typeof(account_tax), true, context); if ((result != null) && (result.Count > 0)) { return((account_tax)result[0]); } return(null); }
public static models.product.product_security aSecurity(string name, Clients.clientOpenERP clientOERP) { List <object> retour; retour = clientOERP.search(new IMDEV.OpenERP.models.query.aQuery("name", name), typeof(models.product.product_security), true); if ((retour != null) && (retour.Count == 1)) { return((models.product.product_security)retour[0]); } return(null); }
public static res_partner aSupplier(string oldCode, Clients.clientOpenERP clientOERP) { try { IMDEV.OpenERP.models.query.aQuery query = new IMDEV.OpenERP.models.query.aQuery(); query.addEqualTo("supplier", true); query.addAND(); query.addEqualTo("old_code", oldCode); return((res_partner)clientOERP.search(query, typeof(res_partner), true)[0]); } catch { } return(null); }
public static List <res_partner> allSuppliers(Clients.clientOpenERP clientOERP, List <string> fieldsList) { List <object> lo; List <res_partner> retour = null; lo = clientOERP.search(new IMDEV.OpenERP.models.query.aQuery("active", true), typeof(res_partner), true, fieldsList); if (lo != null) { retour = new List <res_partner>(); foreach (res_partner obj in lo) { retour.Add(obj); } } return(retour); }
public List <quality.quality_cdc> allCDCQuality(Clients.clientOpenERP clientOERP) { List <object> result; List <quality.quality_cdc> retour; result = clientOERP.search(new IMDEV.OpenERP.models.query.aQuery("partner_id", id), typeof(quality.quality_cdc), true); if (result != null) { retour = new List <IMDEV.OpenERP.EG.models.quality.quality_cdc>(); foreach (quality.quality_cdc obj in result) { retour.Add(obj); } return(retour); } return(null); }
public static List <models.res.res_country_state> allState(Clients.clientOpenERP clientOERP) { List <object> result; List <models.res.res_country_state> retour; result = clientOERP.search(null, typeof(models.res.res_country_state), true); if (result != null) { retour = new List <IMDEV.OpenERP.EG.models.res.res_country_state>(); foreach (models.res.res_country_state s in result) { retour.Add(s); } return(retour); } return(null); }
public static List <account_tax> allTaxes(Clients.clientOpenERP clientOERP) { List <object> result; List <account_tax> retour; result = clientOERP.search(null, typeof(account_tax), true); if ((result != null) && (result.Count > 0)) { retour = new List <account_tax>(); foreach (account_tax t in result) { retour.Add(t); } return(retour); } return(null); }
public static List <list_allergen> allAllergens(Clients.clientOpenERP clientOERP, [email protected] context) { List <object> result; List <list_allergen> retour; result = clientOERP.search(null, typeof(list_allergen), true, context); if ((result != null) && (result.Count > 0)) { retour = new List <list_allergen>(); foreach (list_allergen a in result) { retour.Add(a); } return(retour); } return(null); }
public static List <models.product.product_security> allSecurity(Clients.clientOpenERP clientOERP) { List <object> result; List <models.product.product_security> retour; result = clientOERP.search(null, typeof(models.product.product_security), true); if ((result != null) && (result.Count > 0)) { retour = new List <IMDEV.OpenERP.EG.models.product.product_security>(); foreach (models.product.product_security ps in result) { retour.Add(ps); } return(retour); } return(null); }
public static res_partner aCustomer(string oldCode, string refCode, Clients.clientOpenERP clientOERP, List <string> listFields) { try { IMDEV.OpenERP.models.query.aQuery query = new IMDEV.OpenERP.models.query.aQuery(); query.addEqualTo("customer", true); query.addAND(); if (oldCode != "") { query.addEqualTo("old_code", oldCode); } else { query.addEqualTo("ref", refCode); } return((res_partner)clientOERP.search(query, typeof(res_partner), true, listFields)[0]); } catch { } return(null); }