Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
5851 Zobrazení

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
Zrušit
Autor Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
4
pro 19
6234
0
bře 17
4577
1
led 17
9660
3
říj 24
14246
2
bře 15
4977