安装报表模块出错
-
我在本机上安装的,当我尝试添加报表模块里,服务端出现下面的错误信息:
Thu, 06 Mar 2008 18:25:59 ERROR:web-services:Exception in call: Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/tinyerp-server/netsvc.py", line 200, in _dispatch
r=m(*params)
File "/usr/lib/python2.5/site-packages/tinyerp-server/service/web_services.py", line 422, in execute
return self._execute(db, uid, wiz_id, datas, action, context)
File "/usr/lib/python2.5/site-packages/tinyerp-server/service/web_services.py", line 402, in _execute
return wiz.execute(db, uid, self.wiz_datas[wiz_id], action, context)
File "/usr/lib/python2.5/site-packages/tinyerp-server/wizard/init.py", line 160, in execute
res = self.execute_cr(cr, uid, data, state, context)
File "/usr/lib/python2.5/site-packages/tinyerp-server/wizard/init.py", line 75, in execute_cr
action_res = action(self, cr, uid, data, context)
File "/usr/lib/python2.5/site-packages/tinyerp-server/addons/base/module/wizard/wizard_module_upgrade.py", line 80, in _upgrade_module
db, pool = pooler.restart_pool(cr.dbname, update_module=True)
File "/usr/lib/python2.5/site-packages/tinyerp-server/pooler.py", line 64, in restart_pool
return get_db_and_pool(db_name, force_demo, update_module=update_module)
File "/usr/lib/python2.5/site-packages/tinyerp-server/pooler.py", line 53, in get_db_and_pool
addons.load_modules(db, force_demo, status, update_module)
File "/usr/lib/python2.5/site-packages/tinyerp-server/addons/init.py", line 274, in load_modules
load_module_graph(cr, graph, status, report=report)
File "/usr/lib/python2.5/site-packages/tinyerp-server/addons/init.py", line 204, in load_module_graph
init_module_objects(cr, m, modules)
File "/usr/lib/python2.5/site-packages/tinyerp-server/addons/init.py", line 181, in init_module_objects
obj.init(cr)
File "/usr/lib/python2.5/site-packages/tinyerp-server/addons/report_sale/report_sale.py", line 72, in init
""")
File "/usr/lib/python2.5/site-packages/tinyerp-server/sql_db.py", line 75, in execute
res = self.obj.execute(sql)
ProgrammingError: 错误: 函数 pg_catalog.substring(date, integer, integer) 不存在
LINE 5: substring(s.date_order for 7)||'-'||'01' as name,
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.create or replace view report_sale_order_product as ( select min(l.id) as id, substring(s.date_order for 7)||'-'||'01' as name, s.state, l.product_id, sum(l.product_uom_qty*u.factor) as quantity, count(*), sum(l.product_uom_qty*l.price_unit) as price_total, (sum(l.product_uom_qty*l.price_unit)/sum(l.product_uom_qty*u.factor))::decimal(16,2) as price_average from sale_order s right join sale_order_line l on (s.id=l.order_id) left join product_uom u on (u.id=l.product_uom) group by l.product_id, substring(s.date_order for 7),s.state )