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
=== modified file 'account_budget/account_budget.py'
--- account_budget/account_budget.py 2012-12-17 15:23:03 +0000
+++ account_budget/account_budget.py 2013-11-21 12:04:59 +0000
@@ -109,6 +109,7 @@
109class crossovered_budget_lines(osv.osv):109class crossovered_budget_lines(osv.osv):
110110
111 def _prac_amt(self, cr, uid, ids, context=None):111 def _prac_amt(self, cr, uid, ids, context=None):
112 account_obj = self.pool.get('account.account')
112 res = {}113 res = {}
113 result = 0.0114 result = 0.0
114 if context is None: 115 if context is None:
@@ -117,6 +118,7 @@
117 acc_ids = [x.id for x in line.general_budget_id.account_ids]118 acc_ids = [x.id for x in line.general_budget_id.account_ids]
118 if not acc_ids:119 if not acc_ids:
119 raise osv.except_osv(_('Error!'),_("The Budget '%s' has no accounts!") % str(line.general_budget_id.name))120 raise osv.except_osv(_('Error!'),_("The Budget '%s' has no accounts!") % str(line.general_budget_id.name))
121 acc_ids = account_obj._get_children_and_consol(cr, uid, acc_ids, context=context)
120 date_to = line.date_to122 date_to = line.date_to
121 date_from = line.date_from123 date_from = line.date_from
122 if context.has_key('wizard_date_from'):124 if context.has_key('wizard_date_from'):