Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
5864 Widoki

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

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
4
gru 19
6234
0
mar 17
4578
1
sty 17
9660
3
paź 24
14249
2
mar 15
4977