Skip to Content
Menu
This question has been flagged

Hello, 

I am currently using the Odoo Online installation of version 17.0+e and attempting to create a personalized email marketing campaign. However, I am encountering challenges with incorporating dynamic fields. Specifically:

  • When I use placeholders like ${object.name} or ${object.contact_name}, the email displays them exactly as written without rendering the intended values.
  • Similarly, embedding code such as <span t-field="object.contact_name"/> produces no output.

This leads me to wonder whether Odoo Online imposes certain limitations on customizations, particularly with dynamic fields in email templates, or if I might be missing something in my approach.

Could you please clarify if such limitations exist in the online version, or provide guidance on how to resolve this issue?

Thanks. 

Bran

Avatar
Discard
Best Answer

Hello Branimir,

In the body section, type '/' this will open a popup. Inside that look for 'Dynamic Placeholder'. It allows us to print the respected model's field value in the email template.

Thank you.

Avatar
Discard
Author

Thank you very much, this solved my problem.

Kindly help me with additional issue: Currently, my contact name contains both name and surname. I would like to use only name, or only surname. How can I do that?

Since you are using an Odoo online, You can not code to separate name and surname. However you can "create a field" to store only name/surname from the "contact name" and then use that field in the template. Although, It is achievable, You will need to have unique separator to determine name and surname from contact name.

Best Answer

Hello Branimir Trošić


You can try this, {{object.name}} or {{object.contact_name}} I'm hopping it may work for you:)

Avatar
Discard
Author

Sorry, it does not work.
The {{object.contact_name}} gives full name and surname.

Hello Branimir,
Sorry for responding this late,
If able to can you show me your template so, I can guide you perfectly.
If not, you could most probably try to do this "{{ object.contact_name }}" the contact_name will be replaced with the first name if you could install partner_firstname app which will be free, then also you could ask someone to do it as a feature for you and save it in one field.
For further questions ask here I will be responding in this weekend too!
Thanks

Author Best Answer

Hi Jainil and Eva, thank you for helping. Sure, I will try to elaborate the problem precisely, but since I do not have enough karma points to post screenshots or links, I will try to explain as best as I can: 

I am trying to automate sending emails to leads in CRM module. When trying to create a personalized email campaing in Email Marketing, I want to address every emailed client by their name, f.E.: "Dear Mr. Pancake". In order to do that, I am trying to use the dynamic placeholder  ${object.name}

 However, when I send the test email, I am not receiving the name in the email, but the placeholder itself.

I have searched for possible answers, and found out that there is a possibility that dynamic fields aren't connected to the module, so I activated the developer mode to view the fields, and found only these fields with "name" in it.

Since I didn't found the ${object.name}, I tested it with the placeholder  ${object.contact_name} , and even tried to paste the code itself instead of the placeholder:  <span t-field="object.contact_name"/>. 

I have checked whether the Contact_Name is connected to the CRM (since the Related Model field is empty) and found out this by clicking on contact_name field.

I have also tried to create an email template in Settings->Technical->Email Templates, but found out later that I cannot access email templates from Email Marketing app (only emails I create withing the app). 

I hope this gives enough information, if anything is missing I will gladly provide additional information. 

Thanks, Bran

Avatar
Discard
Best Answer

Hello,

Odoo works the same if online or on-premise, there is no limitation there. Can you please be more specific about what you are trying to achieve and give more details about how you did it? It will allow for a better support.

Good luck

Eva P.

Avatar
Discard
Best Answer

Hello bran,

First of all in customization thing there are no limitations in odoo weather it is online of sh,

further can you explain the problem more with code 

and give a glimpse of what you're trying to do in odoo online if able give photo too.

thanks


Avatar
Discard
Author

Hello Jainil, I have explained the problem further, could you help me solve the problem? Thank you

Hi Jainil and Eva, thank you for helping. Sure, I will try to elaborate the problem precisely, but since I do not have enough karma points to post screenshots or links, I will try to explain as best as I can:

I am trying to automate sending emails to leads in CRM module. When trying to create a personalized email campaing in Email Marketing, I want to address every emailed client by their name, f.E.: "Dear Mr. Pancake". In order to do that, I am trying to use the dynamic placeholder ${object.name}

However, when I send the test email, I am not receiving the name in the email, but the placeholder itself.

I have searched for possible answers, and found out that there is a possibility that dynamic fields aren't connected to the module, so I activated the developer mode to view the fields, and found only these fields with "name" in it.

Since I didn't found the ${object.name}, I tested it with the placeholder ${object.contact_name} , and even tried to paste the code itself instead of the placeholder: <span t-field="object.contact_name"/>.

I have checked whether the Contact_Name is connected to the CRM (since the Related Model field is empty) and found out this by clicking on contact_name field.

I have also tried to create an email template in Settings->Technical->Email Templates, but found out later that I cannot access email templates from Email Marketing app (only emails I create withing the app).

I hope this gives enough information, if anything is missing I will gladly provide additional information.

Thanks, Bran

Related Posts Replies Views Activity
3
Feb 17
9784
5
Aug 24
1670
0
Feb 24
804
0
Jan 22
1744
1
Mar 25
3675