这个OpenERP按钮是如何工作的
我在OpenERP xml视图中遇到了一些代码,我无法理解它是如何工作的这个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=
<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"/>