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
此问题已终结
1
回复
6227
查看
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
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
1
3月 21
|
4654 | ||
|
3
3月 15
|
9733 | ||
|
2
2月 23
|
3208 | ||
|
2
10月 20
|
5891 | ||
|
2
10月 20
|
4138 |