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

<button name="add_workorder" type="object" string="Add Workorder" confirm="Are you sure add Workorder?">

<!-- attrs="{'invisible': [('state','!=','draft')]}" -->

</button>


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello delgertsetseg,


Put button in the tree view and apply attrs on it.

You have to also add state field in the tree view because attrs on state field so you can invisible it.

For Ex:-

<tree>

     <field name="state" invisible="1"/>

    <button name="add_workers" type="object" string="Add Workers" attrs="{'invisible' : [('state', '!=', 'draft')]}" confirm="Are You sure you want to Add Workers"/>

</tree>


Hope it will works for you.

Thanks,

อวตาร
ละทิ้ง
ผู้เขียน

Thanks, i will try

ผู้เขียน

"add_workorder" button is visible , do you have anything idea?

This attrs means, if state is not in draft stage then button is invisible. When the state is draft, button will visible. You want to hide button on draft state or only show button on draft state ?

AFAIK, attrs doesn't work on tree view.

ผู้เขียน

Okey , I show button on only draft state

Related Posts ตอบกลับ มุมมอง กิจกรรม
4
ธ.ค. 23
38576
0
เม.ย. 18
3761
1
เม.ย. 24
2478
attr invisible Workflow button แก้ไขแล้ว
1
ธ.ค. 22
6769
0
ก.พ. 19
14