Button 更新account.invoice工作流时出现问题

Button 更新account.invoice工作流时出现问题,button,workflow,state,invoice,openerp-7,Button,Workflow,State,Invoice,Openerp 7,我已更新我的工作流(添加新对象“已保存”) 问题是: 我必须能够取消“保存”的发票。由于按钮“invoice_cancel”已经存在(代码python ready and works:draft invoice cancel),我只需复制此按钮,将其从saved改为cancel,并更新XML代码,以便能够在“saved”(已保存)状态下单击cancel(取消)按钮: <button name="invoice_cancel" states="draft,proforma2,saved"

我已更新我的工作流(添加新对象“已保存”)

问题是:

我必须能够取消“保存”的发票。由于按钮“invoice_cancel”已经存在(代码python ready and works:draft invoice cancel),我只需复制此按钮,将其从saved改为cancel,并更新XML代码,以便能够在“saved”(已保存)状态下单击cancel(取消)按钮:

 <button name="invoice_cancel" states="draft,proforma2,saved" string="Cancel Invoice"  groups="base.group_no_one"/>


使用旧状态[拔模换模],可以进行取消。由于我的新状态为“已保存”,我无法取消发票。有什么线索吗

为了添加新的转换,您可能需要更改xml文件中的worflow定义。例:

    <record model="workflow.transition" id="your_new_transition">
        <field name="act_from" ref="saved" />
        <field name="act_to" ref="canceled" />
        <field name="signal">invoice_cancel</field>
    </record>

取消发票

您好,欢迎来到本网站。你可能想再看一看你用过的标题,因为它不太清楚你有什么问题。