<button name="add_workorder" type="object" string="Add Workorder" confirm="Are you sure add Workorder?">
<!-- attrs="{'invisible': [('state','!=','draft')]}" -->
</button>
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
<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
Создайте аккаунт сегодня, чтобы получить доступ к эксклюзивным функциям и стать частью нашего замечательного сообщества!
Регистрация| Похожие посты | Ответы | Просмотры | Активность | |
|---|---|---|---|---|
|
4
дек. 23
|
40284 | |||
|
0
апр. 18
|
4287 | |||
|
1
апр. 24
|
3129 | |||
|
1
дек. 22
|
7422 | |||
|
0
февр. 19
|
14 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.