Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
这个OpenERP按钮是如何工作的_Openerp - Fatal编程技术网

这个OpenERP按钮是如何工作的

这个OpenERP按钮是如何工作的,openerp,Openerp,我在OpenERP xml视图中遇到了一些代码,我无法理解它是如何工作的 <button name="%(account.action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/> 调用方法的传统按钮如下所示: <button name="invoice_cancel" states="proforma2,open" string=

我在OpenERP xml视图中遇到了一些代码,我无法理解它是如何工作的

<button name="%(account.action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
调用方法的传统按钮如下所示:

<button name="invoice_cancel" states="proforma2,open" string="Cancel" icon="gtk-cancel"/>

按钮类型为action类型,因此它将触发一个由module.xml\u id调用的操作

因此,它将在account模块中搜索名为action\u account\u invoice\u Return的action xml视图

该操作将在帐户模块的向导文件夹中找到

使用grep函数查找xml

例如:

使用grep-rn“行动、账户、发票、退款”。在帐户模块文件夹中


它将显示

我认为此问题与链接问题重复,即除非是工作流(默认),否则类型必须是对象或操作。上面的invoice_cancel按钮调用python代码,但没有type=objectif按钮调用工作流,则为action else对象
<button name="invoice_cancel" states="proforma2,open" string="Cancel" icon="gtk-cancel"/>