public res_partner_address getAddress(OpenERP.Clients.clientOpenERP clientOpenERP, res_partner_address.ENUM_TYPE typeAdr, List <string> listeChamps) { if ((_f_address.getValue != null) && (_f_address.getValue.Count > 0)) { List <object> retour; OpenERP.models.query.aQuery req; req = new IMDEV.OpenERP.models.query.aQuery(); req.addEqualTo("type", typeAdr.ToString()); req.addAND(); req.addEqualTo("partner_id", id); retour = clientOpenERP.search(req, typeof(res_partner_address), true, listeChamps); if ((retour != null) && (retour.Count >= 1)) { return((res_partner_address)retour[0]); } } return(null); }
public List <res_partner_contact> getContacts(OpenERP.Clients.clientOpenERP clientOpenERP, List <string> listeChamps) { if ((_f_contract_ids.getValue != null) && (_f_contract_ids.getValue.Count > 0)) { IMDEV.OpenERP.models.query.aQuery req = new IMDEV.OpenERP.models.query.aQuery(); List <object> retour; List <res_partner_contact> result; req.addEqualTo("partner_id", id); retour = clientOpenERP.search(req, typeof(res_partner_contact), true, listeChamps); if ((retour != null) && (retour.Count > 0)) { result = new List <res_partner_contact>(); foreach (res_partner_contact rpc in retour) { result.Add(rpc); } return(result); } } return(null); }