Add Customerlize Button in More Button List In Odoo

There‘re two commen type of actions in odoo: ir.actions.server,ir.actions.client_multi

1.Using ir.actions.server

<record model="ir.actions.server" id="xxxx">
        <field name="name">XXX</field>
        <field name="type">ir.actions.server</field>
        <field name="model_id" ref="model_XXX"/>
        <field name="state">code</field>
        <field name="code">self.do_somthing(cr,uid,ids,context)</field>
</record>

2.Using ir.actions.act_window

<record model="ir.actions.act_window" id="xxx">
        <field name="name">xxxx</field>
        <field name="res_model">xxx.xxx</field>
        <field name="view_mode">tree,form</field>
        <field name="view_type">form</field>
        <field name="view_id" ref="xxx.xxxxx.xxxx">
        <field name="target">new</field>
<record>

about is two type of ir.actions. the first one you can execute your own python code at the server side using state type "code". the second one you can call an existing action in client side.

3.how to add button in "more" button list

<record model="ir.values" id="xxxx">
        <field name="name"></field>
        <field name="model_id" ref="xxx_xxxx">
        <field name="model">xxxx</field>
        <field name="key">action</field>
        <field name="key2">client_action_multi</field>
        <field name="value" eval="‘ir.actions.act_window,‘+str(ref(‘action_xxx_xx‘))"/>
</record>
时间: 2024-08-07 00:18:28

Add Customerlize Button in More Button List In Odoo的相关文章

(转载)VS2010/MFC编程入门之二十二(常用控件:按钮控件Button、Radio Button和Check Box)

因为私人问题,鸡啄米暂停更新了几天,首先向关注鸡啄米动态的朋友说一声抱歉. 言归正传,鸡啄米上一节中讲了编辑框的用法,本节继续讲解常用控件--按钮控件的使用. 按钮控件简介 按钮控件包括命令按钮(Button).单选按钮(Radio Button)和复选框(Check Box)等.命令按钮就是我们前面多次提到的狭义的按钮控件,用来响应用户的鼠标单击操作,进行相应的处理,它可以显示文本也可以嵌入位图.单选按钮使用时,一般是多个组成一组,组中每个单选按钮的选中状态具有互斥关系,即同组的单选按钮只能有

&lt;input type="button"&gt;和&lt;button&gt;的区别

<input type="button">和<button>的区别:标题中的两个标签几乎在外观上没什么区别,在用法上甚至都一样,下面就来介绍一下这两个按钮之间的区别.区别一:与<input type="button">相比,<button>标签形式更为丰富,<button>与<tton>之间除了文本之外,还可以是图片或者多媒体内容,不过不能是图像映射,因为它对鼠标和键盘敏感的动作会干扰表单按钮的

&lt;input type =&quot;button&quot;&gt;&lt;/input&gt;和&lt;button&gt;&lt;/button&gt;在mvc中的区别

今天整了一上午,在MVC3中的form表单中放一个<button></button>一触发button中的onclick事件尽管没submit但仍然会提交表单(提交地址是默认传过来的地址一般为/ControllerName/Index)而<input type="button"></input>则不会 无意中把<button>标签放到了<form>标签中,你会发现点击这个button变成了提交,相当于<inp

HTML中button和input button的区别

button和input button的区别 一句话概括主题:<button>具有<input type="button" ... >相同的作用但是在可操控性方面更加强大. HTML 4.01规范的Forms部分指 名表单有以下几种控制类型:buttons, checkboxes, radio buttons, menus, text input, file select, hidden controls, object controls. 其中除了button

VS2010-MFC(常用控件:按钮控件Button、Radio Button和Check Box)

转自:http://www.jizhuomi.com/software/182.html 按钮控件简介 按钮控件包括命令按钮(Button).单选按钮(Radio Button)和复选框(Check Box)等.命令按钮就是我们前面多次提到的狭义的按钮控件,用来响应用户的鼠标单击操作,进行相应的处理,它可以显示文本也可以嵌入位图.单选按钮使用时,一般是多个组成一组,组中每个单选按钮的选中状态具有互斥关系,即同组的单选按钮只能有一个被选中. 命令按钮是我们最熟悉也是最常用的一种按钮控件,而单选按钮

Android 中Button 和Image Button 的区别与联系

今天用Button的时候总是弄不出想要的效果,src图片总是不显示,将图片设置为background又会有默认边框,折腾了一番终于明白了. button 和 Imagebutton 的区别: 1.button 的background 有效,src无效,ImageButton相反2.button 的background 设置为背景时,会有默认边框 附加小知识: button设置为透明的语句:android:background="android:color/transparent"

ListView中加入Button后,Button的点击事件和ListView的点击事件冲突

1.在ItemView配置的xml文件里的根节点加入属性android:descendantFocusability="blocksDescendants" 2.在要加入事件的控件上加入android:focusable="false

ListView中添加Button后,Button的点击事件和ListView的点击事件冲突

1.在ItemView配置的xml文件中的根节点添加属性android:descendantFocusability="blocksDescendants" 2.在要添加事件的控件上添加android:focusable="false

事件模型的介绍与Button的ActionListener

事件监听: 这是个很重要的概念,也是个很重要的模型,vb,vc都是这样用,甚至后面学的web框架也在用.    现在我们可以做很多按钮了吧,但是我们的按钮按它是没反应的,现在我们来看看怎么样才能让它有反应. 先看个例子: import java.awt.*; import java.awt.event.*; public class TestActionEvent { public static void main(String[] args) { Frame f = new Frame("Te