Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
5842 Vizualizări

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

Imagine profil
Abandonează
Autor Cel mai bun răspuns

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
4
dec. 19
6234
0
mar. 17
4574
1
ian. 17
9660
3
oct. 24
14244
2
mar. 15
4977