[FIX] account_move_line: takes into account the ir_rules when listing the partenrs to reconcile
bzr revid: cbi@openerp.com-20130326093413-j0e8hpb0eqig1too
This commit is contained in:
parent
80ac4f3f4f
commit
002f6aa7c1
|
@ -753,9 +753,14 @@ class account_move_line(osv.osv):
|
|||
) AS s
|
||||
WHERE debit > 0 AND credit > 0 AND (last_reconciliation_date IS NULL OR max_date > last_reconciliation_date)
|
||||
ORDER BY last_reconciliation_date""")
|
||||
ids = cr.fetchall()
|
||||
ids = len(ids) and [x[0] for x in ids] or []
|
||||
return self.pool.get('res.partner').name_get(cr, uid, ids, context=context)
|
||||
ids = [x[0] for x in cr.fetchall()]
|
||||
if not ids:
|
||||
return []
|
||||
|
||||
# To apply the ir_rules
|
||||
partner_obj = self.pool.get('res.partner')
|
||||
ids = partner_obj.search(cr, uid, [('id', 'in', ids)], context=context)
|
||||
return partner_obj.name_get(cr, uid, ids, context=context)
|
||||
|
||||
def reconcile_partial(self, cr, uid, ids, type='auto', context=None, writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False):
|
||||
move_rec_obj = self.pool.get('account.move.reconcile')
|
||||
|
|
Loading…
Reference in New Issue