تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
1039 أدوات العرض

<!-- 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
مارس 15
4979
0
سبتمبر 24
946
3
ديسمبر 23
2510
2
يوليو 22
4330
1
سبتمبر 21
3324