コード例 #1
0
ファイル: OpenERPLib.php プロジェクト: hendri30/OpenPrint
 public function workflow($model, $method, $record_id)
 {
     $client = new Client($this->server . "object");
     $client->setSSLVerifyPeer(0);
     $client->return_type = 'phpvals';
     $msg = new Request('exec_workflow');
     $msg->addParam(new Value($this->database, "string"));
     //* database name */
     $msg->addParam(new Value($this->uid, "int"));
     /* useid */
     $msg->addParam(new Value($this->password, "string"));
     /** password */
     $msg->addParam(new Value($model, "string"));
     /** model name where operation will held * */
     $msg->addParam(new Value($method, "string"));
     /** method which u like to execute */
     $msg->addParam(new Value($record_id, "int"));
     /** parameters of the methods with values....  */
     $resp = $client->send($msg);
     if ($resp->faultCode()) {
         return -1;
     } else {
         return $resp->value();
     }
     /* return new generated id of record */
 }