OpenERP-限制高级搜索字段范围(Restrict the fields can be seen in "advanced search")
来源:互联网 发布:xnova源码 编辑:程序博客网 时间:2024/05/22 14:40
因为高级搜索包含对象的所有字段,默认没有做限制。有时候不希望暴露太多字段给用户,所以可以使用如下方法,使高级搜索与普通搜索的字段范围相同。
By default, the advanced search function can search by all of the object's fields. But sometimes, we don't want the user to know much about the inner structure, so we can use below method to restrict the fields used in advanced search as the same as in common search.
修改search.js文件,在约1859行,替换如下代码:
Modify search.js file, at about line 1859, replace below code:
if (field_def.selectable !== false && field_name != 'id') { self.fields[field_name] = field_def;}
替换为:
Replace it by:
if (field_def.selectable !== false && field_name != 'id' && self.view.fields_view.fields[field_name]) { self.fields[field_name] = field_def;}
0 0
- OpenERP-限制高级搜索字段范围(Restrict the fields can be seen in "advanced search")
- If it can be seen, can it be done?
- 高级属性(Advanced Fields)
- how hard can it be? Estimating the difficulty of visual search in an image
- 《How hard can it be? Estimating the difficulty of visual search in an image》和 PPT
- The program 'java' can be found in the following packages
- Can the msgbox vbYesNo button captions be changed in VBA?
- Why can templates only be implemented in the header file?
- Michael Kors Tasche In case the effect can be adverse
- mysql:The package 'mysql' can be found in following packages
- Advanced Custom Fields – 超级wordpress自定义字段插件
- 推荐:BlackBerry高级界面组件 advanced buttons, fields, and managers
- ubuntu 安装maven提示出错 The program 'mvn' can be found in the following packages
- ubuntu14.10 安装maven出现The program 'mvn' can be found in the following packages错误
- nginx报错The program 'nginx' can be found in the following packages
- the program javac can be found in the following packages ubuntu
- [Ubuntu] 解决The program 'make' can be found in the following packages:
- Ubuntu配置JDK出现的The program 'java' can be found in the following packages
- Paoding中文分词参考手册
- 修改eclipse配置文件.ini
- golang 写二叉查找树练习
- 程序员面试知识要点汇总
- nyoj104最大和
- OpenERP-限制高级搜索字段范围(Restrict the fields can be seen in "advanced search")
- 精选C语言学习网站
- 学习之路尚远
- hbase API
- 回调事例
- 使用ViewPager+Fragment+仿网易云音乐的tab选项栏来实现多屏滑动
- C++ 构造函数:初始化列表(困惑之源之一)
- jquery datatable后台封装数据
- recovery分析