safe_eval : 'len()' is not allowed for evaluation!

Bug #631810 reported by Laurent G.
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Status tracked in Trunk
5.0
Fix Released
Medium
Unassigned
Trunk
Fix Released
Medium
Unassigned

Bug Description

Hi,

I have installed the version 5.0.14 on debian server. (upgrade 5.0.12)
When I try to print taxes report (menu "Financial Management" - "Reporting" - "Taxes reports" - " Print Taxes report")
I have this error :

[2010-09-06 19:24:36,078][P31_04092010] ERROR:report:[02]: Environment Information :
[2010-09-06 19:24:36,078][P31_04092010] ERROR:report:[03]: System : Linux-2.6.26-2-686-i686-with-debian-5.0.3
[2010-09-06 19:24:36,079][P31_04092010] ERROR:report:[04]: OS Name : posix
[2010-09-06 19:24:36,079][P31_04092010] ERROR:report:[05]: Distributor ID: Debian
[2010-09-06 19:24:36,079][P31_04092010] ERROR:report:[06]: Description: Debian GNU/Linux 5.0.3 (lenny)
[2010-09-06 19:24:36,080][P31_04092010] ERROR:report:[07]: Release: 5.0.3
[2010-09-06 19:24:36,080][P31_04092010] ERROR:report:[08]: Codename: lenny
[2010-09-06 19:24:36,080][P31_04092010] ERROR:report:[09]: Operating System Release : 2.6.26-2-686
[2010-09-06 19:24:36,081][P31_04092010] ERROR:report:[10]: Operating System Version : #1 SMP Wed Nov 4 20:45:37 UTC 2009
[2010-09-06 19:24:36,081][P31_04092010] ERROR:report:[11]: Operating System Architecture : 32bit
[2010-09-06 19:24:36,081][P31_04092010] ERROR:report:[12]: Operating System Locale : fr_FR.UTF8
[2010-09-06 19:24:36,081][P31_04092010] ERROR:report:[13]: Python Version : 2.5.2
[2010-09-06 19:24:36,082][P31_04092010] ERROR:report:[14]: OpenERP-Server Version : 5.0.14
[2010-09-06 19:24:36,082][P31_04092010] ERROR:report:[15]: Last revision No. & ID :
[2010-09-06 19:24:36,082][P31_04092010] ERROR:report:[16]: report :
[2010-09-06 19:24:36,083][P31_04092010] ERROR:report:[17]: Traceback (most recent call last):
[2010-09-06 19:24:36,083][P31_04092010] ERROR:report:[18]: File "/usr/lib/python2.5/site-packages/openerp-server/report/render/rml2pdf/utils.py", line 116, in _process_text
[2010-09-06 19:24:36,083][P31_04092010] ERROR:report:[19]: txt = eval(expr,self.localcontext)
[2010-09-06 19:24:36,084][P31_04092010] ERROR:report:[20]: File "/usr/lib/python2.5/site-packages/openerp-server/tools/safe_eval.py", line 267, in safe_eval
[2010-09-06 19:24:36,084][P31_04092010] ERROR:report:[21]: return eval(test_expr(expr,_SAFE_OPCODES, mode=mode), globals_dict, locals_dict)
[2010-09-06 19:24:36,084][P31_04092010] ERROR:report:[22]: File "", line 1, in <module>
[2010-09-06 19:24:36,085][P31_04092010] ERROR:report:[23]: NameError: name 'len' is not defined
[2010-09-06 19:24:36,085][P31_04092010] ERROR:report:[24]:
[2010-09-06 19:24:36,085][P31_04092010] ERROR:report:[25]: name 'len' is not defined
[2010-09-06 19:24:36,085][P31_04092010] ERROR:report:[26]: expr: '...'*len(o['level'])

But the report looks good.

Laurent

Changed in openobject-addons:
status: New → Confirmed
Revision history for this message
Dhruti Shastri(OpenERP) (dhs-openerp) wrote :

Hello Laurent G.,

Will you please apply the patch and notify us ?

Thank you for posting.

affects: openobject-addons → openobject-server
Changed in openobject-server:
importance: Undecided → Medium
milestone: none → 5.0.15
Revision history for this message
Dhruti Shastri(OpenERP) (dhs-openerp) wrote :

It has been fixed by revision 2116 <email address hidden>.
Thanks.

summary: - Version 5.0.14 : Error taxes report
+ safe_eval : 'len()' is not allowed for evaluation!
Changed in openobject-server:
status: Confirmed → Fix Released
Revision history for this message
Dhruti Shastri(OpenERP) (dhs-openerp) wrote :

It has been fixed by revision 2704 <email address hidden> for trunk.

Thanks

Revision history for this message
Laurent G. (lguilloteau) wrote :

Hi,

Thank's a lot.
This patch fixe my problem.
Good day

Laurent

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.