Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
5901 Tampilan

Hi,

I would like know the way to get the list of mandatory fields from any object.

Will any orm method be some help?

your support is appreciated much.

thanks

Avatar
Buang
Penulis Jawaban Terbai

Hi,

My colleague found the logic for this.

fields = self.pool.get('sale.order').fields_get(cr, uid)

required_fields = [field for field in fields if 'required' in fields[field] and fields[field]['required']]

print required_fields

Thanks

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
4
Des 19
6256
0
Mar 17
4599
1
Jan 17
9660
3
Okt 24
14273
2
Mar 15
4983