求助,新建账套后,重新登录,出现如下错误,请高手指点
-
Environment Information :
System : Windows-XP-5.1.2600-SP2
OS Name : nt
Operating System Release : XP
Operating System Version : 5.1.2600
Operating System Architecture : 32bit
Operating System Locale : zh_CN.cp936
Python Version : 2.5.2
OpenERP-Client Version : 5.0.11
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
File "netsvc.pyo", line 247, in dispatch
File "netsvc.pyo", line 76, in call
File "service\web_services.pyo", line 577, in execute
File "osv\osv.pyo", line 58, in wrapper
File "osv\osv.pyo", line 119, in execute
File "osv\osv.pyo", line 111, in execute_cr
File "osv\orm.pyo", line 2228, in read
File "osv\orm.pyo", line 2360, in _read_flat
File "osv\fields.pyo", line 659, in get
File "E:\Program Files\OpenERP AllInOne\Server\addons\report_analytic_planning\report_analytic_planning.py", line 138, in _sum_amount_tasks
TypeError: unsupported operand type(s) for +: 'int' and 'tuple' -
File "E:\Program Files\OpenERP AllInOne\Server\addons\report_analytic_planning\report_analytic_planning.py", line 138, in _sum_amount_tasks
TypeError: unsupported operand type(s) for +: 'int' and 'tuple'
检查report_analytic_planning.py的138行,该行你改过吗?或者你下载了新的源码吗?不管什么原因,反正是源码中引入了错误,导致执行出错。 -
我没有改,下载的是最新的源码,是不是我的安装程序有问题呀,哪儿为好心人给我发一个report_analytic_planning.py,谢谢啊,邮箱:[email protected]
-
这是一个bug,已经在开发版本库中修正,你可以选择不安装这个模块,或者按下面的方法来修改(就是找到report_analytic_planning.py文件,在122行和132行的位置,按下面的指示,-表示删除该行,+表示添加该行),linux用户可以直接用patch工具来打这个补丁:
=== modified file 'report_analytic_planning/report_analytic_planning.py'<br />--- report_analytic_planning/report_analytic_planning.py 2010-02-23 14:28:21 +0000<br />+++ report_analytic_planning/report_analytic_planning.py 2010-06-07 09:58:16 +0000<br />@@ -122,7 +122,7 @@<br /> sqlarg = ()<br /> if line.user_id:<br /> where='user_id=%s and '<br />- sqlarg = (line.user_id.id)<br />+ sqlarg = (line.user_id.id,)<br /> cr.execute('''select<br /> sum(planned_hours)<br /> from<br />@@ -132,7 +132,7 @@<br /> project_id in (select id from project_project where category_id=%s) and<br /> date_close>=%s and<br /> date_close<=%s''',<br />- sqlarg + (<br />+ sqlarg + (<br /> line.account_id.id,<br /> line.planning_id.date_from,<br /> line.planning_id.date_to))