Review: Needs Fixing

hello Divyesh,

Patch is not good.
here you are passing 'account_id' in _get_account method then why you need to 
search that id again!!!

        +        def _get_rec(account_id):
12      +            analytic_obj = self.pool.get('account.analytic.account')
13      +            analytic_search_ids = analytic_obj.search(self.cr, 
self.uid, [('id', '=', account_id)])
14      +            analytic_datas = analytic_obj.browse(self.cr, self.uid, 
analytic_search_ids)

you can direct get account like
 -for account in analytic_datas:
 +for account in analytic_obj.browse(self.cr, self.uid, [account_id]):

There is lots of thing to change in your patch

1) result list contains duplicate entries.
2) Unnecessary loops for a single account. etc

Please check it properly 

Thanks,
Purnendu Singh
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-880844-mdi/+merge/83604
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-880844-mdi.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to