Merge lp:~openerp-dev/openobject-addons/7.0-opw-591736-rha into lp:openobject-addons/7.0

Proposed by Rifakat Husen (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-591736-rha
Merge into: lp:openobject-addons/7.0
Diff against target: 19 lines (+2/-0)
1 file modified
account_budget/account_budget.py (+2/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-591736-rha
Reviewer Review Type Date Requested Status
Lionel Sausin - Initiatives/Numérigraphe (community) duplicate Disapprove
Martin Trigaux (OpenERP) Pending
Naresh(OpenERP) Pending
Rifakat Husen (OpenERP) Pending
Review via email: mp+196090@code.launchpad.net

This proposal supersedes a proposal from 2013-05-01.

Description of the change

Allow Children account too if view account is used in Budget Position to be able to get the
Practical amount in Budget based on the account(view) and it's children.

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Martin Trigaux (OpenERP) (mat-openerp) wrote : Posted in a previous version of this proposal

Hello

The amounts of childs accounts is now computed on the parent account of type views. This should not be required anymore than.
I reject the MP then

Regards

Revision history for this message
Martin Trigaux (OpenERP) (mat-openerp) wrote : Posted in a previous version of this proposal

Oups sorry, wrong model, this still does not work.

However I would like to have a fix allowing to use accounts of type view. The problem come from the fact we use SQL queries with account ids. Look at what we do in __compute from account, we use child account ids, please do the same.

Revision history for this message
Rifakat Husen (OpenERP) (rha-openerp) wrote : Posted in a previous version of this proposal

Dear Martin,
Does it look ok now?

Please let me know,
Rifakat

review: Needs Resubmitting
Revision history for this message
Lionel Sausin - Initiatives/Numérigraphe (ls-initiatives) wrote :
review: Disapprove (duplicate)

Unmerged revisions

9626. By Rifakat Husen (OpenERP)

[FIX] account_budget: allow children of a view account

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_budget/account_budget.py'
2--- account_budget/account_budget.py 2012-12-17 15:23:03 +0000
3+++ account_budget/account_budget.py 2013-11-21 12:04:59 +0000
4@@ -109,6 +109,7 @@
5 class crossovered_budget_lines(osv.osv):
6
7 def _prac_amt(self, cr, uid, ids, context=None):
8+ account_obj = self.pool.get('account.account')
9 res = {}
10 result = 0.0
11 if context is None:
12@@ -117,6 +118,7 @@
13 acc_ids = [x.id for x in line.general_budget_id.account_ids]
14 if not acc_ids:
15 raise osv.except_osv(_('Error!'),_("The Budget '%s' has no accounts!") % str(line.general_budget_id.name))
16+ acc_ids = account_obj._get_children_and_consol(cr, uid, acc_ids, context=context)
17 date_to = line.date_to
18 date_from = line.date_from
19 if context.has_key('wizard_date_from'):