I have a selection field like
field = fields.Selection([('a', 'A'), ('b', 'B')],string='Test')
When i tried fetching the selected element in the selection field the key 'a' is getting printed to the pdf, i needs to print the 'A'
<t t-esc="med['field']"/> #med is one2many line connecting model A to the B,i'm trying to fetch the datas from model B(Notebook),
I don't know about older versions, but atleast in Odoo 13.0 just use t-field instead of t-esc so Odoo will get the right value for you. Simple example:
<span t-field="med.field" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With