跳至內容
選單
此問題已被標幟
1 回覆
5839 瀏覽次數

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

頭像
捨棄
作者 最佳答案

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
4
12月 19
6234
0
3月 17
4574
1
1月 17
9660
3
10月 24
14242
2
3月 15
4977