Skip to Content
Menu
This question has been flagged
2 Replies
2482 Views

Hello,

I've create 3 models. The first one ('First model') has some fields and to one2many fields. For each one2many fields I have a different model (Second model and third model).

In my mail template based on second model, I want to access to data from third model. How can I do that ?


example :

first model is a training actions.

Second model lists the persons who have subscribe to the training actions.

The third model lists the date of training actions.

I want to send a mail to each person with some personal information presen in the second model and I want to list in this mail the different dates of training action.


Thanks for your help.
Avatar
Discard
Author Best Answer

Hello Jainesh.

I don't understand what you say. But I find the solution to link second model with third model by using One2many fields from first model.

It works fine with a For loop.

Avatar
Discard
Best Answer

Hello Eric,

Every Models(Second model and third model) have first model's ID (first model's Many2one field)


And first model's ID is same in the Every Models(Second model and third model) for perticular records


So, you can access third model's data by using first model's ID (first model's Many2one field).


I hope this help to you.

Regards,




Email:   odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

   

Avatar
Discard