Hello Ujjvala and Bhumika, I'm sorry to announce you that your fix is
incorrect.
Instead of removing "template" account from the child_complete_ids list,
it removes some "template" accounts but also some normal acounts and
leave some other "template" accounts in the list.
Thie bug lies in analytic/analytic.py, in this method:
def _child_compute(self, cr, uid, ids, name, arg, context=None):
result = {}
if context is None:
context = {}
for account in self.browse(cr, uid, ids, context=context):
for child in account.child_ids:
if child.state == 'template':
account.child_ids.pop(account.child_ids.index(child))
result[account.id] = map(lambda x: x.id, account.child_ids)
That Python code looks rather cryptic to me, so I cannot give details
here, but I guess the bug occurs because you are removing elements from
the account.child_ids list while you are iterating it at the same time.
I believe this doesn't work well in Python.
** Changed in: openobject-addons
Status: Fix Released => Confirmed
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/681463
Title:
[6.0][project] template project shouldn't pollute the analytic chart
of account
Status in OpenERP Modules (addons):
Confirmed
Bug description:
in addons #3958 with project installed, if I create some project and then set
it in "template" mode, I'll then see it's corresponding analytic account in the
analytic chart of account.
I think this is annoying if you have many templates and want to use analytic
accounting.
The way it's done, template project will have an associated analytic
account, I see no easy alternative here (because of the heritage).
Now, a possible option would be to filter out those account related to
template projects in the analytic chart of account. I tried a few
things but were unable to find a patch, may be there is a limitation
with OpenERP and filters in tree views.
Hope it helps
_______________________________________________
Mailing list: https://launchpad.net/~c2c-oerpscenario
Post to : [email protected]
Unsubscribe : https://launchpad.net/~c2c-oerpscenario
More help : https://help.launchpad.net/ListHelp