This question has been flagged
1 Reply
5769 Views

hi all ,

i want to get price unit , with xmlrcp , i am coding with php .

with this extract of code :

     $this->msg = new xmlrpcmsg('execute');
     $this->msg->addParam(new xmlrpcval($this->database, "string"));
     $this->msg->addParam(new xmlrpcval(1, "int"));
     $this->msg->addParam(new xmlrpcval($this->password, "string"));
     $this->msg->addParam(new xmlrpcval("product.product","string"));
     $this->msg->addParam(new xmlrpcval("read", "string"));
     $this->msg->addParam(new xmlrpcval($ids_read, "array"));
     $this->msg->addParam(new xmlrpcval($key, "array"));

i just get , Id, and name

Avatar
Discard
Best Answer

Hi. If you want ypou can use my librery to manage openerp data from php with xml-rpc in simple way.

https://github.com/OpenCode/openerp-php-connector

In the index.php you can reed some examples. Use them to read the price from product.

Avatar
Discard
Author

hi , thanks for replay , i am trying it , but he dont work .

What error it get you? I useit very much and I haven't problre,

Author

dirst in index.php , you forgot a " ; " in line 42 then ,after this correction , a big list of error appear , then i am trying to call a new version of "xmlrpc.inc" . theni got one ERROR :

SCREAM: Error suppression ignored for ( ! ) Fatal error: Call to a member function scalarval() on a non-object in C:\wamp\www\portail\openerp-php-connector-master\openerp.class.php on line 48

Oh..i'm so sorry for the mistake. I will fix it...thanks...:)

Author

can i have your mail adress to sent you the screenshots

All the error you read are normal. They are not mine but based on original xml-rpc library. The last error is returned when php-xml-rpc can't login in openerp. Are all the parameters for the connection right?

f.apruzzese AT andreacometa DOT it