I have a list here and I trying to mapped the brand field. May I know how can I mapped this appended list?
Ex.[Chanel, Vuitton, Vuitton, Celine]
I wanted Vuitton returned 1 data only
ai_list = []
for ai in ai_record:
for ail in ai.invoice_line_ids:
ai_list.append({ 'partner_id': partner_id.name,
'transaction_date': ai.date_invoice,
'invoice_number': ai.number,
'brand': ai.brand, // how to use mapped() here
'net_value': ai.residual, })
return ai_list
#python #for #odoo #customization
https://old.reddit.com/r/PythonForOdoo/