Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
2283 Vistas

So I'm trying to create an email that will be directly send to the owner of the email, so for example here, my subject here is {{object.employee_id.name}}​ and I don't know where I get this info.

What I want here is to attach the name of Bailey Boi on the content of the email. What I tried is I activate developer tool

since I'm still noob at Oddo, I have two questions.

1.) Where did I get the {{object.employee_id.name}}?

2.) Is there any guide on learning on how can I manipulate the data like the image above, we're using SaaS and I'm trying to learn the  studio app

PS: Hello, I keep on asking, but I really want to learn Odoo, and I'm still new to this setup, I hope you can understand


Avatar
Descartar
Mejor respuesta

Hi,
1. In your email template, the Applies to is the payslip model, so the object in the template will be referring to this model.

So object here is hr.payslip model (Applies To) and employee_id is a field in this model.

So to get the name of employee in the payslip: object.employee_id.name is used as  employee_id is a many2one field, if you remove .name and test the email template, you can see the difference.

2. To learn odoo email templates, see if this helps:  How To Create Email Template In Odoo || Odoo Email Templates

Thanks

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
jul 24
3790
1
oct 23
3290
1
nov 22
380
1
dic 19
5808
4
jun 24
3418