Ir al contenido
Menú
Se marcó esta pregunta
How to change the “partner_to” tag and send email to more partners?  

CODE
I inherited the template and changed “partner_to” and “subject”, the subject changed, but not the “partner_to”.



NOTES
  • I added xml file in manifest
  • I also tried:
    • {{str(object.mapped('my_partner_ids.email') if object.my_partner_ids else object.mapped('my_partner_ids.email')).replace("'","") }}
    • {{ ', '.join(object.mapped('my_partner_ids.email')) if object.my_partner_ids else '' }}
    • {{object.mapped('my_partner_ids.email')}}

SOURCES

Link 1 Link 2 Link 3



What am I doing wrong; What am I missing?
Avatar
Descartar
Mejor respuesta

Hi Vasilis: There is a typo in partner_to. You need 2 closing braces }}. One of them is missing.

One more thing, partner_to accepts a comma-separated list of ids not emails.

Avatar
Descartar
Autor

Hello Paresh, can you please give me a correct example of a comma-separated list of ids ? thank you for your answer in advance.

Hi Vasilis: Try this in partner_to (I'm assuming you have a custom field called my_partner_ids since you mentioned it in your example).

{{ object.my_partner_ids.ids }}

Publicaciones relacionadas Respuestas Vistas Actividad
1
ago 24
2188
1
abr 24
1723
0
dic 23
1814
0
ago 23
1628
1
nov 24
4504