openerp学习笔记 视图(tree\form)中隐藏按钮( 创建、编辑、删除 ),tree视图中启用编辑
视图(tree\form)中隐藏按钮( 创建、编辑、删除 )
create="false" edit="false" delete="false"
tree视图中启用编辑
editable="top" (新增行在上) 或 editable="bottom" (新增行在下)
代码示例:
<record model="ir.ui.view"
id="dispatch_product_cost_recording_form">
<field
name="name">dispatch.product.cost.recording.form</field>
<field
name="model">dispatch.product.cost.recording</field>
<field
name="type">form</field>
<field name="arch"
type="xml">
<form string="产品成本变更记录" create="false" edit="false"
delete="false">
<field
name="dispatch_product"/>
<field
name="cost"/>
<field
name="create_uid"/>
<field
name="create_date"/>
</form>
</field>
</record>

<record model="ir.ui.view" id="dispatch_product_cost_recording_tree">
<field
name="name">dispatch.product.cost.recording.tree</field>
<field
name="model">dispatch.product.cost.recording</field>
<field
name="type">tree</field>
<field name="arch"
type="xml">
<tree string="产品成本变更记录" create="false" edit="false"
delete="false">
<field
name="dispatch_product"/>
<field
name="cost"/>
<field
name="create_uid"/>
<field
name="create_date"/>
</tree>
</field>
</record>

<record id="view_warehouse_batch_orderpoint_tree" model="ir.ui.view">
<field
name="name">stock.warehouse.batch.orderpoint.tree</field>
<field
name="model">stock.warehouse.orderpoint</field>
<field
name="arch" type="xml">
<tree
string="Reordering Rules"
editable="top">
<field
name="name" />
<field name="warehouse_id"
on_change="onchange_warehouse_id(warehouse_id)"
widget="selection"
groups="stock.group_locations" />
<field
name="location_id" groups="stock.group_locations"
/>
<field name="company_id"
groups="base.group_multi_company"
widget="selection"
/>
<field name="product_id"
on_change="onchange_product_id(product_id)"
/>
<field name="product_uom"
groups="product.group_uom" />
<field
name="product_min_qty" />
<field
name="product_max_qty" />
<field
name="qty_multiple" string="Quantity Multiple"
/>
</tree>
</field>
</record>

openerp学习笔记 视图(tree\form)中隐藏按钮( 创建、编辑、删除 ),tree视图中启用编辑的更多相关文章
- openerp学习笔记 视图样式(表格行颜色、按钮,字段只读、隐藏,按钮状态、类型、图标、权限,group边距,聚合[合计、平均],样式)
表格行颜色: <tree string="请假单列表" colors="red:state == 'refuse';blue:state = ...
- python3.4学习笔记(十五) 字符串操作(string替换、删除、截取、复制、连接、比较、查找、包含、大小写转换、分割等)
python3.4学习笔记(十五) 字符串操作(string替换.删除.截取.复制.连接.比较.查找.包含.大小写转换.分割等) python print 不换行(在后面加上,end=''),prin ...
- 用SQL语句创建和删除Access数据库中的表;添加列和删除列
用SQL语句创建和删除Access数据库中的表;添加列和删除列 Posted on 2009-08-11 13:42 yunbo 阅读(1240) 评论(0) 编辑 收藏 用SQL语句创建和删除Acc ...
- 使用API接口在zabbix系统中登陆、创建、删除agent
一.API的介绍 API(Application Programming Interface,应用程序编程接口)是一些预先定义的函数,目的是提供应用程序与开发人员基于某软件或硬件得以访问一组例程的能力 ...
- openerp学习笔记 视图继承(tree、form、search)
支持的视图类型:form.tree.search ... 支持的定位方法: <notebook position="inside"> ...
- openerp学习笔记 统计、分析、报表(过滤条件向导、分组报表、图形分析、比率计算、追加视图排序)
待解决:图形中当改变分组时,图例不正确 存储比率计算时,分组合计不正确 wizard:过滤条件向导,用于输入过滤条件 wizard/sale_chart.py # -*- cod ...
- openerp学习笔记 搜索视图(自己创建的、自己的、本部门的、本部门及下属部门的、今日的、日期从,日期至、多条件模糊搜索、or、and)
自己创建的: domain="[('create_uid','=',uid)]" 自己的: domain="[('employee_id','=','#kl_user_e ...
- openerp学习笔记 context 的应用
1.在Action中定义,context用于传递搜索条件和分组条件,在搜索视图中默认显示: 示例代码: <record model="ir.actions.act_window&quo ...
- openerp学习笔记 domain 增加扩展支持,例如支持 <field name="domain">[('type','=','get_user_ht_type()')]</field>
示例代码1,ir_action_window.read : # -*- coding: utf-8 -*-from openerp.osv import fields,osv class res_us ...
随机推荐
- 2018.09.19 atcoder AtCoDeer and Election Report(贪心)
传送门 很有意思的一道贪心. 就是每次翻最小的倍数来满足条件. 代码: #include<bits/stdc++.h> #define ll long long using namespa ...
- 2018.08.10 atcoder Median Sum(01背包)
传送门 题意简述:输入一个数组an" role="presentation" style="position: relative;">anan. ...
- Part 5 - Django ORM(17-20)
https://github.com/sibtc/django-beginners-guide/tree/v0.5-lw from django.conf.urls import url from d ...
- win10 新增删除文件不刷新
实际上是桌面图标缓存出问题,以下是一个简单动作即可解决问题. 按Win+R键打开“运行”窗口,输入如下命令后按回车键执行: ie4uinit -show 立竿见影,效果同360,魔方等工具软件,可参考 ...
- sqlserver 清除日志
要使用Master数据库执行 DUMP TRANSACTION 数据库名 WITH NO_LOG 2.再打开企业管理器--右键你要压缩的数据库--所有任务--收缩数据库--收缩文件--选择日志文件-- ...
- 表格边框重复合并属性: border-collapse:collapse;
table { border-collapse:collapse; }
- Android+PHP开发最佳实践
本书以一个完整的微博应用项目实例为主线,由浅入深地讲解了Android客户端开发和PHP服务端开发的思路和技巧.从前期的产品设计.架构设计,到客户端和服务器的编码实现,再到性能测试和系统优化,以及最后 ...
- Hdu2612 Find a way 2017-01-18 14:52 59人阅读 评论(0) 收藏
Find a way Time Limit : 3000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other) Total Su ...
- OpenGL中的矩阵相乘
OpenGL中的矩阵相乘 1, 在OpenGL中所有的视图变换,模型变换 都是4×4矩阵,每个后续的glMultiMatrix*(N),或者变换函数,glTranslate* (),glRotate* ...
- hdu 5035 指数分布无后效性
http://acm.hdu.edu.cn/showproblem.php?pid=5035 n个柜台每个柜台服务的时间都满足指数分布t=p(k),求min(p(k)+t)的期望 指数分布一个有趣的特 ...