Closed (fixed)
Project:
Odoo / OpenERP Proxy API
Version:
7.x-1.4
Component:
Documentation
Priority:
Critical
Category:
Support request
Assigned:
Reporter:
Created:
3 Aug 2011 at 15:29 UTC
Updated:
31 Aug 2011 at 19:51 UTC
I`m crazy with instruction for making possible search something via OpenERPProxy::search
we have to send array()
but...
what kind of array?
may be someone can help me with a real example
I see a few documentation lines at openerp http://doc.openerp.com/v6.0/developer/6_22_XML-RPC_web_services/index.ht...
$key = array(new xmlrpcval(array(new xmlrpcval($attribute , "string"),
new xmlrpcval($operator,"string"),
new xmlrpcval($keys,"string")),"array"),
);
in openerp proxy
we are using a bit more different code
public function request($module, $action, $args = array()) {
$ultimate_callback_args = array();
$url = variable_get('openerp.url', '');
$path = $url."/".$module;
$ultimate_callback_args[0]=$path;
$ultimate_callback_args[1][$action]=$args;
....
And I`m loosing my mind thinking about how to make search array()
Comments
Comment #1
podarokComment #2
lipinponmala007 commenteddear Podarok.. i didn't understand exactly what you have mentioned..but let me do a guess pls neglect if i make any nonsense..
as an example let me take a project info from openERP searching for any project with id =27
Comment #3
sduensin commentedI've got a related issue... How do you search on fields returned as arrays? Such as 'partner_id'? I've tried:
However, 'partner_id' contains both an integer and a string in an array. How can I pull a list of issues for a particular partner?
Thanks.
Comment #4
sduensin commentedOk, I'm not sure what was wrong before. Guessing a cache somewhere wasn't flushed. For anyone else who runs into this, you just search for the integer portion of combined fields like partner_id and company_id. The code snippit posted above works if $partner_id is an integer.
Comment #5
lipinponmala007 commentedomg!!! so that was the confusion ..i couldn't understand it before...thanks sduensin..
case1: the searching field is not an array like id.Then
case 2a: the searching field is an array like 'partner_id', then above fails..i.e $search=array(array('partner_id','=','34'));
so to search by partner Id .Then
Why not..? we can do by partner name
also
hope you will try this...