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
2760 Zobrazení

So every partner have this fields that I added to list fields in my method. those fields are many2one fields with comodel 'product.category' so they are in the same table. how can I retrieve id's of all this field for a current partner?


Avatar
Zrušit
Nejlepší odpověď

Hi,

would you like to get current partner field value by key? Then, just use it in brackets.

for field in fields:    
    print (self[field])

If you want to find ir.model.fields record, just use standard Odoo search by model and field name

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvn 19
2553
1
dub 17
4885
1
čvc 25
483
1
úno 25
1244
0
zář 23
2187