title: how to create journal entries and items in odoo using xmlrpc in php?
body: <p>This is the code im using to create journal entries with journal items.</p>
  
  <pre><code> //Journal entry creation
   function createJournalEntries($jId, $partnerId, $name, $amount, $ref, $periodId, $check, $date)
   {
      $dAccId = 8;
      $cAccId = 6;
      $name = 'tea';
      $debit = 20;
      $credit = 20;
      $amtCur = 0.00;
      $taxAcc = 15;
      $taxAmt = 2;
  
      $jlines = array (
                  new xmlrpcval(
                  array(
                      "name"              =&gt; new xmlrpcval($name, "string"),
                      "partner_id"    =&gt; new xmlrpcval($partnerId, "int"),
                      "account_id"        =&gt; new xmlrpcval($dAccId, "int"),
                      "debit"             =&gt; new xmlrpcval(20.00, "float"),
                      "credit"            =&gt; new xmlrpcval(0.00, "float")
                  )
                  ),
                  new xmlrpcval(
                  array (
                      "name"              =&gt; new xmlrpcval($name, "string"),
                      "partner_id"    =&gt; new xmlrpcval($partnerId, "int"),
                      "account_id"        =&gt; new xmlrpcval($dAccId, "int"),
                      "debit"             =&gt; new xmlrpcval(0.00, "float"),
                      "credit"            =&gt; new xmlrpcval(20.00, "float")
                  )
                  )
      );
  
      $val = array (
          "journal_id"    =&gt; new xmlrpcval($jId, "int"),
          "partner_id"    =&gt; new xmlrpcval($partnerId, "int"),
          "name"          =&gt; new xmlrpcval($name, "string"),
          "amount"        =&gt; new xmlrpcval($amount, "float"),
          "ref"           =&gt; new xmlrpcval($ref, "string"),
          "peroid_id"     =&gt; new xmlrpcval($periodId, "int"),
          "date"          =&gt; new xmlrpcval($date, "string"),
          "to_check"      =&gt; new xmlrpcval($check, "boolean"),
          "line_id"       =&gt; new xmlrpcval($jlines, "array"),
      );
      $module = 'account.move';
      $method = 'create';
      $valu= $this-&gt;create($module, $method, $val);
  
      return $valu;
  }
  </code></pre>
  
  <p>this is the main function to create.</p>
  
  <pre><code>  //function for create
    public function create($module, $method, array $values = array()) {
  
      $this-&gt;client-&gt;setSSLVerifyPeer(0);
  
  
      if (strpos($this-&gt;userId, 'LOGIN FAIL:') === false) { 
  
      try {
  
         $msg = new xmlrpcmsg('execute');
         $msg-&gt;addParam(new xmlrpcval($this-&gt;dbname, "string"));
         $msg-&gt;addParam(new xmlrpcval($this-&gt;userId, "int"));
         $msg-&gt;addParam(new xmlrpcval($this-&gt;password, "string"));
         $msg-&gt;addParam(new xmlrpcval($module, "string"));
         $msg-&gt;addParam(new xmlrpcval($method, "string"));
         $msg-&gt;addParam(new xmlrpcval($values, "struct"));
  
         $response = $this-&gt;client-&gt;send($msg);
  
         if (!empty($response-&gt;faultString())) {
  
              return  "FAIL: in create:".$response-&gt;faultString();
              //return $userId;
          }
  
         return $response-&gt;value()-&gt;scalarval();
  
          } catch (Exception $e) {
  
              throw new Exception("Create Exception:". $e);
          }
      }else{
          return $this-&gt;userId;
      }
  }
  </code></pre>
  
  <p>Here I could not get journal items with the journal entry.</p>
  
  <p>xmlrpc returned the error like object error</p>