[IMP] remove store=true and add store={} in recouncile field
bzr revid: jar@tinyerp.com-20140424065306-e6q3g48cjee1ybni
This commit is contained in:
parent
54229eb751
commit
a55015b8eb
|
@ -430,6 +430,19 @@ class account_move_line(osv.osv):
|
|||
elif line.reconcile_partial_id:
|
||||
res[line.id] = str(line.reconcile_partial_id.name)
|
||||
return res
|
||||
|
||||
def _get_move_from_reconcile(self, cr, uid, ids, context=None):
|
||||
move = {}
|
||||
for r in self.pool.get('account.move.reconcile').browse(cr, uid, ids, context=context):
|
||||
for line in r.line_partial_ids:
|
||||
move[line.move_id.id] = True
|
||||
for line in r.line_id:
|
||||
move[line.move_id.id] = True
|
||||
move_line_ids = []
|
||||
if move:
|
||||
move_line_ids = self.pool.get('account.move.line').search(cr, uid, [('journal_id','in',move.keys())], context=context)
|
||||
return move_line_ids
|
||||
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=64, required=True),
|
||||
|
@ -445,7 +458,8 @@ class account_move_line(osv.osv):
|
|||
'statement_id': fields.many2one('account.bank.statement', 'Statement', help="The bank statement used for bank reconciliation", select=1),
|
||||
'reconcile_id': fields.many2one('account.move.reconcile', 'Reconcile', readonly=True, ondelete='set null', select=2),
|
||||
'reconcile_partial_id': fields.many2one('account.move.reconcile', 'Partial Reconcile', readonly=True, ondelete='set null', select=2),
|
||||
'reconcile': fields.function(_get_reconcile, type='char', string='Reconcile Ref', store=True),
|
||||
'reconcile': fields.function(_get_reconcile, type='char', string='Reconcile Ref', store={
|
||||
'account.move.line': (lambda self, cr, uid, ids, c={}: ids, ['reconcile_id','reconcile_partial_id'], 50),'account.move.reconcile': (_get_move_from_reconcile, None, 50)}),
|
||||
'amount_currency': fields.float('Amount Currency', help="The amount expressed in an optional other currency if it is a multi-currency entry.", digits_compute=dp.get_precision('Account')),
|
||||
'amount_residual_currency': fields.function(_amount_residual, string='Residual Amount in Currency', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in its currency (maybe different of the company currency)."),
|
||||
'amount_residual': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in the company currency."),
|
||||
|
|
Loading…
Reference in New Issue