[FIX] account_cancel: re-open invoice assigned to useability/no one
authorARA (OpenERP) <ara@tinyerp.com>
Tue, 26 Jul 2011 09:10:51 +0000 (14:40 +0530)
committerARA (OpenERP) <ara@tinyerp.com>
Tue, 26 Jul 2011 09:10:51 +0000 (14:40 +0530)
bzr revid: ara@tinyerp.com-20110726091051-22djjebh06h2jxmc

addons/account/account_invoice_view.xml
addons/account_cancel/account_cancel_view.xml

index 0f12001..8d28475 100644 (file)
                                 <field name="state"/>
                                 <field name="residual"/>
                                 <group col="6" colspan="4">
-                                    <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
+                                    <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="base.group_no_one"/>
                                     <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
                                     <button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
                                     <button name="%(action_account_state_open)d" type='action' string='Re-Open' states='paid' icon="gtk-convert" groups="base.group_no_one"/>
                                 <field name="state"/>
                                 <field name="residual"/>
                                 <group col="8" colspan="4" groups="base.group_user">
-                                    <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
+                                    <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="base.group_no_one"/>
                                     <button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
 
                                     <button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
index 786afb9..3e751f8 100644 (file)
@@ -22,6 +22,9 @@
                 <xpath expr="/form/notebook/page/group/group/button[@name='%(account.action_account_state_open)d']" position="replace">
                     <button name='%(account.action_account_state_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert" groups="account.group_account_invoice"/>
                 </xpath>
+                <xpath expr="/form/notebook/page/group/group/button[@name='invoice_cancel']" position="replace">
+                    <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="account.group_account_invoice"/>
+                </xpath>
             </field>
         </record>
 
@@ -34,6 +37,9 @@
                 <xpath expr="/form/notebook/page/group/group/button[@name='%(account.action_account_state_open)d']" position="replace">
                     <button name='%(account.action_account_state_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert" groups="account.group_account_invoice"/>
                 </xpath>
+                <xpath expr="/form/notebook/page/group/group/button[@name='invoice_cancel']" position="replace">
+                    <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="account.group_account_invoice"/>
+                </xpath>
             </field>
         </record>