コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
1017 ビュー

<!-- 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?

アバター
破棄
最善の回答

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

アバター
破棄
関連投稿 返信 ビュー 活動
1
3月 15
4969
0
9月 24
944
3
12月 23
2502
2
7月 22
4324
1
9月 21
3319