[FIX] account_payment: on payment line import, use 'debit' lines from voucher onchang...
authorXavier ALT <xal@openerp.com>
Fri, 1 Jun 2012 14:33:28 +0000 (16:33 +0200)
committerXavier ALT <xal@openerp.com>
Fri, 1 Jun 2012 14:33:28 +0000 (16:33 +0200)
bzr revid: xal@openerp.com-20120601143328-c1kpk1c2adkzmv0y

addons/account_payment/wizard/account_payment_populate_statement.py

index 6f2d9d0..cedfe55 100644 (file)
@@ -95,8 +95,8 @@ class account_payment_populate_statement(osv.osv_memory):
                 }
                 voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context)
                 voucher_line_dict =  False
-                if result['value']['line_ids']:
-                    for line_dict in result['value']['line_ids']:
+                if result['value']['line_dr_ids']:
+                    for line_dict in result['value']['line_dr_ids']:
                         move_line = move_line_obj.browse(cr, uid, line_dict['move_line_id'], context)
                         if line.move_line_id.move_id.id == move_line.move_id.id:
                             voucher_line_dict = line_dict
@@ -120,4 +120,4 @@ class account_payment_populate_statement(osv.osv_memory):
 
 account_payment_populate_statement()
 
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: