Hello,
First, I'm brand new in xml-rpc so please apologize if my question seems dummy :S
I need to connect my company custom software to openerp. My company software manage products only by reference (used like primary key) and openerp use "ids".
In order to correctly update product fields within product.product, I try to build like a "gateway" between both of them. This way, I want to retrieve all tuple of "default_code" & "ids" from openerp. I'll then be able to build a "hash" for translating "my company primary key" in "openerp primary key" for all my other write action (update).
Is there a "list" method or something that made something like "select ids,default_code from product.product"
I tried to use the "read" xml-rpc call, but : - empty value for "fields" give me all fields for a specified ids. - empty value for "ids" give me nothing.
Maybe a "wildcard" exists for ids ? I tried "*" but get an error...
DataError: invalid input syntax for integer: "*"
here is a sample code :
#!/usr/bin/perl
use strict;
use warnings;
use Frontier::Client;
use Data::Dumper;
my($user) = 'admin';
my($pw) = 'admin';
my($db) = 'Base2';
my($model) = 'product.product';
#login
my $server_url = 'h t t p : / / localhost:8069/xmlrpc/common';
my $server = Frontier::Client->new('url' => $server_url);
my $uid = $server->call('login',$db,$user,$pw);
my $server_url = 'h t t p : / / localhost:8069/xmlrpc/object';
my $server = Frontier::Client->new('url' => $server_url);
my $data = $server->call('execute',$db, $uid, $pw, $model, 'read', '*', '');
print Dumper($data);
Thank you in advance for any tips, advice, solution ;)