Hi,
I have button, and I want to make it disabled after code execution:
="object" class="btn-primary"
Is it possible to change class and append `disabled` after clicking button in call_function?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,
I have button, and I want to make it disabled after code execution:
="object" class="btn-primary"
Is it possible to change class and append `disabled` after clicking button in call_function?
adding class through js, write an onclick function for that particular button and write similar code inside it
var element = document. getElementById('#button_id');
element. classList. add('disabled');
is it possible to change class, from python code? in method `call_function` itself, after button is pressed?
One way to do this is:
Have a Binary field: is_button_enabled
Have 2 identical buttons is view display, like:
with atrs: invisible and check is_button_enabled field for button1 and button2
attrs="{'invisible': [('is_button_enabled', '=', False)]}
and
attrs="{'invisible': [('is_button_enabled', '=', True)]}
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
2
thg 3 23
|
9772 | ||
Cacher le bouton "créer" d'une liste
Đã xử lý
|
|
2
thg 3 23
|
2234 | |
|
0
thg 3 22
|
1485 | ||
|
1
thg 5 21
|
4198 | ||
|
1
thg 9 20
|
3445 |