[FIX] l10n_ch : Invoices were not being referenced properly when using Import BVR...
authorAnup (OpenERP) <ach@tinyerp.com>
Mon, 4 Jul 2011 12:46:51 +0000 (18:16 +0530)
committerAnup (OpenERP) <ach@tinyerp.com>
Mon, 4 Jul 2011 12:46:51 +0000 (18:16 +0530)
bzr revid: ach@tinyerp.com-20110704124651-dzqldzjr6dt62bt7

1  2 
addons/l10n_ch/wizard/bvr_import.py

@@@ -167,6 -167,6 +167,7 @@@ def _import(self, cursor, user, data, c
  #                    line2reconcile = line.id
                      account_id = line.account_id.id
                      break
++        context.update({'move_line_ids': line_ids})
          result = voucher_obj.onchange_partner_id(cursor, user, [], partner_id, journal_id=statement.journal_id.id, price=abs(record['amount']), currency_id= statement.currency.id, ttype='receipt', date=statement.date ,context=context)
          voucher_res = { 'type': 'receipt' ,
  
              'period_id': statement.period_id.id
               }
          voucher_id = voucher_obj.create(cursor, user, voucher_res, context=context)
-         context.update({'move_line_ids': line_ids})
 -        ctx = context.copy()
 -        ctx.update({'move_line_ids': line_ids})
          values['voucher_id'] = voucher_id
          voucher_line_dict =  False
          if result['value']['line_ids']: