Skip to Content
मेन्यू
This question has been flagged
1 Reply
5862 Views

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
Discard
Author Best Answer

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
Discard
Related Posts Replies Views Activity
4
दिस॰ 19
6234
0
मार्च 17
4578
1
जन॰ 17
9660
3
अक्तू॰ 24
14248
2
मार्च 15
4977