[FIX] account: when creating partial reconcilation after unreconciliating one invoice, make sure we create this partial reconcilation only if we have at least two lines

bzr revid: mat@openerp.com-20140507133552-v4qsdp7qdp9iwewi
This commit is contained in:
Martin Trigaux 2014-05-07 15:35:52 +02:00
parent 5bfc8cdfdc
commit e0fb0a6434
1 changed files with 1 additions and 1 deletions

View File

@ -1029,7 +1029,7 @@ class account_move_line(osv.osv):
if opening_reconciliation:
obj_move_rec.write(cr, uid, unlink_ids, {'opening_reconciliation': False})
obj_move_rec.unlink(cr, uid, unlink_ids)
if all_moves:
if len(all_moves) >= 2:
obj_move_line.reconcile_partial(cr, uid, all_moves, 'auto',context=context)
return True