[V6.0.2]Wrong analytic account calculation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
When you have several child analytic account. All the analytic accounts between the root one and the last child are not well calculated.
Hereunder the proposal for correction :
file : analytic/
replace the two functions in the file by this :
def _compute_
def recursive_
account = self.browse(cr, uid, account_id)
for son in account.child_ids:
res = recursive_
for field in field_names:
return res
for account in self.browse(cr, uid, ids, context=context):
if account.id in account_root_ids:
res = recursive_
return res
def _debit_
res = {}
if context is None:
context = {}
child_ids = tuple(self.
for i in child_ids:
res[i] = {}
for n in name:
if not child_ids:
return res
where_date = ''
if context.
if context.
FROM account_
WHERE a.id IN %s
""" + where_date + """
GROUP BY a.id""", where_clause_args)
for ac_id, debit, credit, balance, quantity in cr.fetchall():
res[ac_id] = {'debit': debit, 'credit': credit, 'balance': balance, 'quantity': quantity}
return self._compute_
Hello Emeric,
I have analysed your bug report but I am not getting that where you have faced the problem.
I have checked your issue with latest stable 6.0.3 and trunk both, but analytic account's computation are working fine.
So Would you please provide the proper scenario on this where you have faced the problem, also try with the latest version and notify us.
Thanks and waiting for your reply!