Hi everyone, I have a problem on a readonly field in which its value disappears when I am saving a record in odoo 10. Can you help me about this problem?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
Hi,
As you are using odoo 10, you have to use an OCA module: Read Only ByPass
This module changes the behaviour of Odoo by propagating on_change modifications to readonly fields to the backend create and write methods.
To change that behavior you have to set context on ir.actions.act_window:
{'readonly_by_pass': True}
or by telling fields allowed to change:
{'readonly_by_pass': ['readonly_field_1', 'readonly_field_2',]}
On one2many fields, you can also pass the context in the field definition:
From the version 11 and above, we can use force_save="1" along with the field.
Thank you very much for this Niyas Raphy. I appreciated it.
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
AanmeldenGerelateerde posts | Antwoorden | Weergaven | Activiteit | |
---|---|---|---|---|
|
3
aug. 19
|
12731 | ||
READONLY PRICE UNIT
Opgelost
|
|
7
jul. 19
|
4727 | |
|
0
jun. 19
|
3087 | ||
|
0
mrt. 19
|
5195 | ||
|
2
sep. 18
|
3168 |