Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
5394 มุมมอง
0
\\\\\\\\\
\
\

i\'m\ trying\ To\ Hide\ Validation\ button\ on\ stock\.picking\ form\,\ I\'m\ searching\ about\ the\ button\ on\&nbsp\;\stock.view_picking_form and found tow button with name button_validate.

 <button name="button_validate" attrs="{'invisible': ['|', ('state', 'in', ('waiting','confirmed')), ('show_validate', '=', False)]}" string="Validate" type="object" class="oe_highlight" groups="stock.group_stock_user"/>
 <button name="button_validate" attrs="{'invisible': ['|', ('state', 'not in', ('waiting', 'confirmed')), ('show_validate', '=', False)]}" string="Validate" type="object" groups="stock.group_stock_user" class="o_btn_validate"/>

in my condition, I want to hide the first one based on Boolean field using xbath like that

 <xpath expr="//button[@name='button_validate']" position="attributes">
       <attribute name="attrs">{'invisible': ['|','|', ('state', 'in', ('waiting','confirmed')), ('show_validate', '=', False),('is_has_access', '=', 'False')]}</attribute>
 </xpath>

after saving and upgrade the module I found attrs has been updated of button information but it still visible even if the Field = False

So how can I achieve that and hide this button? Any help will be appreciated

อวตาร
ละทิ้ง

Hope this will helps in future: https://goo.gl/8HgnCF

ผู้เขียน คำตอบที่ดีที่สุด

i have typo error in domian  

       <attribute name="attrs">{'invisible': ['|','|', ('state', 'in', ('waiting','confirmed')), ('show_validate', '=', False),('is_has_access', '=', 'False')]}</attribute>
the last False should be without quotes 
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ม.ค. 22
2378
1
มิ.ย. 24
2703
3
เม.ย. 24
5807
0
ก.ค. 22
1125
1
ส.ค. 24
894