I'm having a problem when I try to overwrite the state of a button wich has a action on the name.
This button has this code:
<button name="%(action_account_invoice_refund)d" type='action' string='Refund Invoice' states='open,proforma2,paid' groups="base.group_user"/>
What I want is just modify the old state to states='open,paid' for the button apears on the paid and open states.
So I did this:
<record model="ir.ui.view" id="account_invoice_update_journal_inherit">
<field name="name">account.invoice.update.journal.inherit</field>
<field name="model">account.invoice</field>
<!--<field name="inherit_id"-->
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml"><button name="%(action_account_invoice_refund)d" type='action' string='Refund Invoice' states='open,proforma2,paid' groups="base.group_user" position="replace">
<button name="%(action_account_invoice_refund)d" type='action' string='Refund Invoice' states='open,paid' groups="base.group_user"/>
</button>
The problem I can't solve is this:
raise ValueError('External ID not found in the system: %s' % (xmlid))
ParseError: "External ID not found in the system: corp101_at_pt.action_account_invoice_refund" while parsing /usr/lib/python2.7/dist-packages/openerp/addons/corp101_at_pt/corp101_pt_saft_rules/inherit_views/account_invoice_inherit.xml:34, near
<record model="ir.ui.view" id="account_invoice_update_journal_inherit">
<field name="name">account.invoice.update.journal.inherit</field>
<field name="model">account.invoice</field>
<!--<field name="inherit_id"-->
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml"><data><button name="%(action_account_invoice_refund)d" type="action" string="Refund Invoice" states="open,proforma2,paid" groups="base.group_user" position="replace">
<button name="%(action_account_invoice_refund)d" type="action" string="Refund Invoice" states="open,paid" groups="base.group_user"/>
</button>
How can I solve this problem?
Best Regards