转帖:Odoo加载翻译后无法登陆 - REINDEX
-
原帖:http://blog.csdn.net/wangnan537/article/details/40489869
在Odoo中加载翻译后,有时会出现无法登陆的问题。前台页面错误信息如下,
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
这时需要查看后台的提示信息,如果出现类似下面的信息:
bad query: SELECT value
FROM ir_translation
WHERE lang='zh_CN'
AND type in ('view')
AND src='Edit Company data' AND res_id=167 AND name='web
site'
...
QWebException: index "ir_translation_src_hash_idx" contains unexpected zero page
at block 30
HINT: Please REINDEX it.
则表明ir_translation表的索引出现了问题;根据提示,重构索引即可解决问题。方法如下:
(1)在数据库命令行输入命令: REINDEX INDEX ir_translation_src_hash_idx;
(2)也可通过pgAdmin操作,选定ir_translation表的ir_translation_src_hash_idx索引,点击维护,选择"REINDEX"。
好像 ubuntu 下 没发现,windows下 确实有这个问题。