I'm looking to change the following code, but I'm struggling to understand the "then" aspect of this "if" statement
${('' if object.partner_id and object.partner_id.email and object.partner_id.email==object.email else object.email|safe)}
What I want is:
If partner_id exists and partner_id.email exists
Use partner_id.email field (how do I do this??)
Else
Use object.email
Thanks
Try this,
${('' if object.partner_id and object.partner_id.email and object.partner_id.email==object.partner_id.email else object.email)}
Did not work @Niyas.
Error without exception. Probably due do sending an email without computed recipients.
then just try this also,
${('' if object.partner_id and object.partner_id.email and object.partner_id.email==object.partner_id.email else object.email|safe)}