[FIX] prevent adding False to a list of ids to write

This commit is contained in:
Vincent Vinet
2014-07-08 19:35:49 -04:00
committed by Sandy Carter
parent 9426e89499
commit d2e0d35fd2

View File

@@ -120,7 +120,9 @@ class bank_acc_rec_statement(osv.osv):
statement_line_ids = []
for statement_line in statement_lines:
statement_line_ids.append(statement_line.id)
line_ids.append(statement_line.move_line_id.id) # Find move lines related to statement lines
if statement_line.move_line_id.id:
line_ids.append(statement_line.move_line_id.id) # Find move lines related to statement lines
# Reset 'Cleared' and 'Bank Acc Rec Statement ID' to False
account_move_line_obj.write(cr, uid, line_ids, {'cleared_bank_account': False,
@@ -367,4 +369,4 @@ class bank_acc_rec_statement_line(osv.osv):
bank_acc_rec_statement_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: