Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2686 Lượt xem

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


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 24
4100
1
thg 10 23
3510
need answers Đã xử lý
1
thg 11 22
380
1
thg 12 19
6009
4
thg 6 24
3890