"Odoo" 相关的信息如下,共 112条
实现思路为继承Odoo前端基类`web.SearchView`在初始化时做处理使本地存储 visible_search_menu 置为True,具体代码如下
```
odoo.define('visible_search_menu', function (require) {
"use strict";
var SearchView = require('web.SearchView');
Se ... ...
在主页面样式中加入如下内容即可
```css
.o_list_view td, .o_list_view th {
white-space: nowrap;
}
.o_list_view > tbody > tr > td.o_handle_cell {
white-space: nowrap;
``` ... ...
超级管理员用户(root用户) id为1,所以通过在act_window上设置domain即可达到效果
````
domain = [('id', '!=', 1)]
````
如果要通过模块安装方式做可以参考 https://www.odoo.com/apps/modules/10.0/buff_hide_root_user/ ... ...
### 外键对象设置为不可点击
```
<field name="master" options="{'no_open': True}"/>
```
### 列表页不显示创建按钮
```
<tree create="false" string="Apps">
```
### 表单页面不显示创建、编辑按钮
```
<form create="0" edit="0" string="Module" ... ...