Bhumi Thakkar (Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.1-opw-577762-bth into
lp:openobject-addons/6.1.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-577762-bth/+merge/119508
Hello,
[Cust : CYM - Choose Your Model] open any contract and print the report with
necessory info,"Crossovered Analytic" GOT ERROR:
1. Sales => Sales => Contracts
2. Open any record and open report 'Crossovered Analytic' and print the report.
Observed: (<type 'exceptions.IndexError'>, IndexError('list index out of
range',),
<traceback object at 0xc8ddf04>)
Expected: Print report successfully.
Put condition before use on browse record if to_return_ids: also for if ref_ids:
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-577762-bth/+merge/119508
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.1-opw-577762-bth.
=== modified file 'account_analytic_plans/report/crossovered_analytic.py'
--- account_analytic_plans/report/crossovered_analytic.py 2011-01-14 00:11:01 +0000
+++ account_analytic_plans/report/crossovered_analytic.py 2012-08-14 11:01:24 +0000
@@ -44,11 +44,15 @@
# to avoid duplicate entries
if id not in to_return_ids:
to_return_ids.append(analytic_obj.search(self.cr,self.uid,[('parent_id','child_of',[id])]))
- data_accnt = analytic_obj.browse(self.cr,self.uid,to_return_ids[0])
- for data in data_accnt:
- if data.parent_id and data.parent_id.id == ref_ids[0]:
- parent_list.append(data.id)
- final_list.append(ref_ids[0])
+
+ if to_return_ids:
+ data_accnt = analytic_obj.browse(self.cr,self.uid,to_return_ids[0])
+
+ for data in data_accnt:
+ if data.parent_id and data.parent_id.id == ref_ids[0]:
+ parent_list.append(data.id)
+ if ref_ids:
+ final_list.append(ref_ids[0])
set_list = self.set_account(parent_list)
final_list.extend(set_list)
return final_list #to_return_ids[0]
_______________________________________________
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