title: dictionary update sequence element #0 has length 3; 2 is required
body: <p>I want to add lines to the object <code>account.bank.statement.line</code> through other object But I get following error: </p>
  
  <blockquote>
    <p>"dictionary update sequence element #0 has length 3; 2 is required"</p>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <pre><code>def action_account_line_create(self, cr, uid, ids):
      res = False
      cash_id = self.pool.get('account.bank.statement.line')
      for exp in self.browse(cr, uid, ids):
          company_id = exp.company_id.id
          #statement_id = exp.statement_id.id
          lines = []
          for l in exp.line_ids:
              lines.append((0, 0, {
                  'name': l.name,
                  'date': l.date,
                  'amount': l.amount,
                  'type': l.type,
                  'statement_id': exp.statement_id.id,
                  'account_id': l.account_id.id,
                  'account_analytic_id': l.analytic_account_id.id,
                  'ref': l.ref,
                  'note': l.note,
                  'company_id': l.company_id.id
              }))
  
          inv_id = cash_id.create(cr, uid, lines,context=None)
          res = inv_id
      return res 
  </code></pre>
  
  <p>I changed it on that but then I ran into this error: </p>
  
  <pre><code>  File "C:\Program Files (x86)\OpenERP 6.1-20121029-003136\Server\server\.\openerp\workflow\wkf_expr.py", line 68, in execute
    File "C:\Program Files (x86)\OpenERP 6.1-20121029-003136\Server\server\.\openerp\workflow\wkf_expr.py", line 58, in _eval_expr
    File "C:\Program Files (x86)\OpenERP 6.1-20121029-003136\Server\server\.\openerp\tools\safe_eval.py", line 241, in safe_eval
    File "C:\Program Files (x86)\OpenERP 6.1-20121029-003136\Server\server\.\openerp\tools\safe_eval.py", line 108, in test_expr
    File "&lt;string&gt;", line 0   
     ^
  SyntaxError: unexpected EOF while parsing
  </code></pre>
  
  <p><strong>Code:</strong> </p>
  
  <pre><code>def action_account_line_create(self, cr, uid, ids, context=None):
      res = False
      cash_id = self.pool.get('account.bank.statement.line')
      for exp in self.browse(cr, uid, ids):
          company_id = exp.company_id.id
          lines = []
          for l in exp.line_ids:
              res = cash_id.create ( cr, uid, {
                  'name': l.name,
                  'date': l.date,
                  'amount': l.amount,
                  'type': l.type,
                  'statement_id': exp.statement_id.id,
                  'account_id': l.account_id.id,
                  'account_analytic_id': l.analytic_account_id.id,
                  'ref': l.ref,
                  'note': l.note,
                  'company_id': l.company_id.id
              }, context=None)
      return res
  </code></pre>