Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
5384 Näkymät

I want to extract name from partner_ids i.e. a many2many field, so that i can use it with the attachment prefix for the 'partner ledger report'. Please help if anyone can.

Avatar
Hylkää
Paras vastaus

partner_ids is a list, so you can access the first value as such partner_ids[0].name

Avatar
Hylkää
Tekijä

You are right, but the problem is I already tried this way and its not working. I have to use 'object.field_name+.pdf' kind of expression to save the report as attachment. When I try like this the report doesn't get printed and i get this error: "TypeError: coercing to Unicode: need string or buffer, tuple found"

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
maalisk. 15
5335
0
maalisk. 15
4525
1
huhtik. 17
329
3
elok. 16
9444
2
maalisk. 15
9433