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
الرد
6175
أدوات العرض
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
مارس 21
|
4635 | ||
|
3
مارس 15
|
9711 | ||
|
2
فبراير 23
|
3177 | ||
|
2
أكتوبر 20
|
5863 | ||
|
2
أكتوبر 20
|
4125 |