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

Let's say I have this dictionary returned to me by an api:

{'idnumber': 123, 'balance': 456, 'fee': 789}


I already made a custom read-only field on res.orders and would like to display 'balance' on it. Is there a "correct" way of loading 'balance'? I'm fairly new to python and odoo so all viable ways are welcomed!

Imagine profil
Abandonează
Cel mai bun răspuns

hello,

i'm not sure if this is you want

you can use dic['balance']

eg :

dict_eg = {'idnumber': 123, 'balance': 456, 'fee': 789}

print dict_eg['balance']      // this will give 456

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
iun. 18
4187
1
ian. 20
5292
1
ian. 25
9998
3
sept. 22
30885
1
nov. 18
5624