Skip to Content
Menu
This question has been flagged

<!-- Cancel -->                        

<button name="button_cancel" string="Cancel Entry" type="object" groups="account.group_account_invoice" data-hotkey="w"  attrs="{'invisible' : ['|', '|', ('id', '=', False), ('state', '!=', 'draft'),('move_type', '!=', 'entry')]}"/>                        

<button name="button_cancel" string="Cancel" type="object" groups="account.group_account_invoice" data-hotkey="w" attrs="{'invisible' : ['|', '|', ('id', '=', False), ('state', '!=', 'draft'),('move_type', '==', 'entry')]}"/>


 I want to change the color of the Cancel button in Accounting (view_move_form) by inherit in Odoo 15, but I'm having trouble because there are 2 cancel buttons. I tried adding a condition by entering a string but got an error. Can anyone help me?

Avatar
Discard
Best Answer

Hello Aprilia,

You can define second index as per following code to inherit "cancel" button.

<xpath expr="//button[@name='button_cancel'][2]" position="attributes">
<attribute name="xyz">{....}</attribute>
</xpath>



Thanks & Regards,

CandidRoot Solutions Pvt. Ltd.

Mobile: (+91) 8849036209

Email: info@candidroot.com

Avatar
Discard
Related Posts Replies Views Activity
1
Mar 15
4732
0
Sep 24
712
3
Dec 23
1909
2
Jul 22
4037
1
Sep 21
2937