i need a option once i click a button, particular field option should be change to readonly in form. Is it possible to change a field with readonly, after pressing a button? Explain me in detail with example.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- सीआरएम
- e-Commerce
- लेखांकन
- इन्वेंटरी
- PoS
- Project
- MRP
This question has been flagged
1
Reply
6174
Views
After Clicking the button Can Update the record State
And set field readonly based on Updated record state
For example,
'name': fields.char('Date', size=64, states={'new': [('readonly', True)]}),
def button_click(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'new'}, context=context)
return True
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
मार्च 21
|
4635 | ||
|
3
मार्च 15
|
9710 | ||
|
2
फ़र॰ 23
|
3177 | ||
|
2
अक्तू॰ 20
|
5863 | ||
|
2
अक्तू॰ 20
|
4125 |