I am trying to define a new field in read only mode, but it is not working:
<field name="sale_margin_percent" groups="base.group_user" attr="{'readonly': True}"/>what is wrong with above definition? thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I am trying to define a new field in read only mode, but it is not working:
<field name="sale_margin_percent" groups="base.group_user" attr="{'readonly': True}"/>what is wrong with above definition? thanks
you can do readonly="1" without attr... attr is usefull if you want use a domain for conditional value...
If I save the record, should readonly="1" fields be stored into database?
Using readonly="1" makes the user not being able to edit the field, but it is neither moved to database when you store the record.
Aa the field is updatd by onchange events, I would like to be able to avoid user modifying that field but at the same time moving the value back to database on save.
Any ideas?
You can create a second field. First fiels are updated by onchange and invisible in form. Second fields is a related in readonly. Should works...
Создайте аккаунт сегодня, чтобы получить доступ к эксклюзивным функциям и стать частью нашего замечательного сообщества!
Регистрация| Похожие посты | Ответы | Просмотры | Активность | |
|---|---|---|---|---|
|
4
мая 23
|
11915 | |||
|
1
янв. 19
|
10446 | |||
|
0
окт. 17
|
4250 | |||
|
0
нояб. 16
|
3482 | |||
|
0
окт. 16
|
5690 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.