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.07.23[PA2015]Siano(线段树)
[PA2015]Siano 描述 Description 农夫Byteasar买了一片n亩的土地,他要在这上面种草. 他在每一亩土地上都种植了一种独一无二的草,其中,第i亩土地的草每天会长高a[i]厘 ...
- 2018.07.06 POJ1273 Drainage Ditches(最大流)
Drainage Ditches Time Limit: 1000MS Memory Limit: 10000K Description Every time it rains on Farmer J ...
- LA 3942 && UVa 1401 Remember the Word (Trie + DP)
题意:给你一个由s个不同单词组成的字典和一个长字符串L,让你把这个长字符串分解成若干个单词连接(单词是可以重复使用的),求有多少种.(算法入门训练指南-P209) 析:我个去,一看这不是一个DP吗?刚 ...
- Linux将程序添加到服务的方法(通用)
一:咱们通过这篇文章来演示怎么将某个程序作为服务(就类似Windows服务可以开机自动启动),这里以tomcat为例,已经亲测过: 二:步骤(最好用root用户来做这种事情,切换root用户记得su ...
- Before an Exam
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=93241#problem/B (654123) http://codeforces.com ...
- DDA_为微分绘制直线算法
DDA_为微分绘制直线算法 以步进坐标轴部长=1像素为单位,计算y=kx + b,绘制像素点(x, round(y)). 即步进坐标增长1, 另一坐标增长K或者1/k. 程序如下: //数值微分算法D ...
- 软件工程—WC功能实现 (JAVA)
软件工程-WC功能实现(JAVA) Github项目地址:https://github.com/Ousyoung/wc 项目要求 wc.exe 是一个常见的工具,它能统计文本文件的字符数.单词数和 ...
- 理解load averages
今天在客户的生产环境中遇到了网络丢包的问题,但是查看我方部署smokeping监控发现对同一条线路监控,我方监控显示正常,判断丢包是由客户服务器负载过高导致,原因及排查思路如下: 使用uptime ...
- 配置Jenkins构建失败触发邮件报警机制
系统管理 1.进入系统管理-->系统设置 定位到Jenkins Location配置项 配置系统管理员邮件地址 系统管理员邮件地址需要同发送报警邮件地址相同 定位到邮件通知 配置SMTP ...
- 常用到的一些js方法,记录一下
获取字符串长度 function GetStringLength(str) { return str.replace(/[^\x00-\xff]/g, "00").length; ...