在悬停“?”符号时移除工具提示
请看这个截图,帮我看看怎么去掉黄色框里红色的文字('object:: res users Field:: new_password')。
1 个回答
3
注意:我假设你正在使用OpenERP v6。
找到文件 openerp.ui.tips.js
,这个文件应该在你的Web客户端文件夹里。如果你使用的是Linux,可以在终端输入以下命令来找到它:
sudo find / -type f -name 'openerp.ui.tips.js'
接下来,用你喜欢的编辑器打开这个文件,找到以下几行:
...
this.toolTitle = SPAN({'class': 'tipTitle'});
this.toolText = P({'class': 'tipText'});
this.toolModel = SPAN({'class': 'tipExtra'});
this.toolField = SPAN({'class': 'tipExtra'});
this. modelTitle = SPAN({'style': 'font-weight:bold;'}, _('Object')+' :: ')
this.fieldTitle = SPAN({'style': 'font-weight:bold;'}, _('Field')+' :: ')
...
把你不需要的提示信息那几行注释掉,然后用一个空字符串替换掉它们。对于你的情况,你需要做的是:
...
this.toolTitle = SPAN({'class': 'tipTitle'});
this.toolText = P({'class': 'tipText'});
this.toolModel = '';//SPAN({'class': 'tipExtra'});
this.toolField = '';//SPAN({'class': 'tipExtra'});
this. modelTitle = '';//SPAN({'style': 'font-weight:bold;'}, _('Object')+' :: ')
this.fieldTitle = '';//SPAN({'style': 'font-weight:bold;'}, _('Field')+' :: ')
...
重启Web客户端。问题就解决了。
PS:在OpenERP中,红色文本的提示信息非常有用,特别是当你在为自己的需求进行定制时。在决定隐藏它们之前,请仔细考虑一下。