removed bug from charts of account: it did not open lines for consolidated tree with different accounts which does not comes in its range of parent_left
bzr revid: mra@tinyerp.com-20081114093702-ed0bmk6momj3h6r7
This commit is contained in:
parent
4008ff421f
commit
5539019f6a
|
@ -154,6 +154,13 @@ class account_account(osv.osv):
|
|||
args[pos] = ('id','in',ids1)
|
||||
pos+=1
|
||||
|
||||
if context and context.has_key('consolidate_childs'): #add concolidated childs of accounts
|
||||
ids = super(account_account,self).search(cr, uid, args, offset, limit,
|
||||
order, context=context, count=count)
|
||||
for consolidate_child in self.browse(cr, uid, context['account_id']).child_consol_ids:
|
||||
ids.append(consolidate_child.id)
|
||||
return ids
|
||||
|
||||
return super(account_account,self).search(cr, uid, args, offset, limit,
|
||||
order, context=context, count=count)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
|
@ -27,6 +27,7 @@ class wizard_move_line_select(wizard.interface):
|
|||
def _open_window(self, cr, uid, data, context):
|
||||
mod_obj = pooler.get_pool(cr.dbname).get('ir.model.data')
|
||||
act_obj = pooler.get_pool(cr.dbname).get('ir.actions.act_window')
|
||||
account_obj = pooler.get_pool(cr.dbname).get('account.account')
|
||||
fiscalyear_obj = pooler.get_pool(cr.dbname).get('account.fiscalyear')
|
||||
|
||||
if not context.get('fiscalyear', False):
|
||||
|
@ -48,6 +49,10 @@ class wizard_move_line_select(wizard.interface):
|
|||
'fiscalyear': context.get('fiscalyear', False),
|
||||
'account_id': data['id']
|
||||
}
|
||||
if data['id']:
|
||||
acc_data = account_obj.browse(cr, uid, data['id']).child_consol_ids
|
||||
if acc_data:
|
||||
result['context'].update({'consolidate_childs': True})
|
||||
result['domain']=result['domain'][0:-1]+','+domain+result['domain'][-1]
|
||||
return result
|
||||
|
||||
|
|
Loading…
Reference in New Issue