Skip to content

Commit

Permalink
[IMP] account_budget: support view and consolidation children in budget
Browse files Browse the repository at this point in the history
  • Loading branch information
lmignon authored and Stefan Rijnhart committed Jul 2, 2014
1 parent 7b7ca96 commit 80fc1de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions addons/account_budget/account_budget.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ def _prac_amt(self, cr, uid, ids, context=None):
result = 0.0
if context is None:
context = {}
account_obj = self.pool.get('account.account')
for line in self.browse(cr, uid, ids, context=context):
acc_ids = [x.id for x in line.general_budget_id.account_ids]
acc_ids = account_obj._get_children_and_consol(cr, uid, acc_ids, context=context)
if not acc_ids:
raise osv.except_osv(_('Error!'),_("The Budget '%s' has no accounts!") % ustr(line.general_budget_id.name))
date_to = line.date_to
Expand Down

0 comments on commit 80fc1de

Please sign in to comment.