title: Odoo v8 PHP Insert One2many or Many2many field
body: <p>I am trying in Odoo v8 to create an invoice and its invoice lines using PHP.
  However, when creating an invoice line I need to population invoice_line_tax_id which is a many2many field.</p>
  
  <p>I have tried to read this page but I cannot figure it out : <a href="https://www.odoo.com/documentation/8.0/reference/orm.html#openerp.models.Model.write" rel="nofollow">https://www.odoo.com/documentation/8.0/reference/orm.html#openerp.models.Model.write</a></p>
  
  <p>Here is how I create an invoice line</p>
  
  <pre><code>$result = $models-&gt;execute_kw($db, $uid, $password,
      'account.invoice.line', 'create',
      array(array(
          'invoice_id'=&gt; 15,
          'product_id'=&gt; 2,
          'quantity'=&gt; 1,
          'name'=&gt; 'Abonnement standard' ,
          'price_unit' =&gt; 50 ,
          'invoice_line_tax_id' =&gt; array( 0 , false , array( 2 ) )
      )));
  </code></pre>
  
  <p>I have the following error in return :</p>
  
  <p>string 'Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/openerp/service/wsgi_server.py", line 75, in xmlrpc_return
      result = openerp.http.dispatch_rpc(service, method, params)
    File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 114, in dispatch_rpc
      result = dispatch(method, params)
    File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 37, in dispatch
      res = fn(db, uid, *params)
    File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", li'... (length=2004)</p>
  
  <p>If I just put the invoice_line_tax_id this way :</p>
  
  <pre><code>'invoice_line_tax_id' =&gt; array( 0 , false , 2 )
  </code></pre>
  
  <p>It works but no tax is inserted.</p>
  
  <p>Any idea how to make this work ?</p>
  
  <p>Thanks in advance.</p>