Now a days Mailing mechanism is to fast for any communication. Here I would like to serve you how to send mail in openerp and how to use a custom templates for sending mail.
Required module for Installation:
--> email_templates
Here First of all you need to configure outgoing email server.
For Outing Mail Servers:
Settings/Technical/Email/Outing Mail Servers
Google:
smtp.gmail.com
SSL Port 465
StartTLS Port 587
Yahoo:
smtp.mail.yahoo.com
SSL Port 465
If you success to configure openerp outgoing email server then lets see how to use a custom templates for sending mail.
Here First of all you need to install email_template module.This module is used to specify the format in which the email has to be send.
For Templates:
Settings/Technical/Email/Templates
In templates need to set required field
Name : Name of the template
Applies to: Model to which the template is related [Ex: sale order]
Form: sender address
To: Destination mail address
Reply To : Preferred Reply address
Subject : Subject of the mail
Body : Body of the email [either plain text or an HTML format]
Add signature: predefine signature for all.
Main important feature of email_templates is dynamically value builder tab where you can fetch your required field from related document model and also use the field value in [Form,TO,Subject,Body] anywhere in mail template.
Field Description:
Field : Select field from Applies to model
In our Example:we select sale order modele in applies to so all sale order filed display here like [name, ref, company_id, partner_id, etc]
Sub-Model : When a relation field like many2one is selected, this field specify the Related model.
Example: partner_id is many2one field which related with res.partner
Sub-field : When a relation field is selected, this field let us select the target field inside the Sub-Model
Ex: In sub-model if you select partner_id than you can use all partner table field as sub field
Placeholder Expression : This is the resulting expression generated when the fields are selected in Dynamic Value Builder. This can be copy pasted in fields in email template.
ex: ${object.partner_id.email}
In Advanced tab you can find this many field:
Language: language of the mail
Outgoing mail server: Outgoing Mail Server configured before
Auto Delete : Permanently delete the email after sending it to save space
Attachment: to attach files on email.
Button events:
Preview: preview of mail_template
Add context action: this creates a links in [more] in the related document model form view which helps in sending email any time from the form view.
example: I have created a template for the sale.order and a link is created by clicking "Add Context action" button in template, a link will be created as shown below screen-shot:
When you click on this link, a wizard pops up using from which we can send email to clicking send button:
Thanks,
Mayur Maheshwari
Mayur Maheshwari
Thanks for the great overview.
ReplyDeleteI have a specific challenge: I would like e-mail an OpenERP (V7) invoice to a customer so that he can import that into his own OpenERP. The V6-documentation describes a functionality in the portal ("EDI panel") where the customer can choose to import the document into his own OpenERP.
But in my OpenERP V7, the template "Invoice - Send by Email (Portal)" only provides a link to "access the invoice document and pay online via our Customer Portal" - not download it. And the link takes the customer to a portal without the "EDI panel".
Where could I find the e-mail template that would enable the customer to import the document into his own OpenERP?
Or can the EDI panel feature be activated with some configuration or setting in the standard OpenERP? I have been looking around, but haven't been able to find a solution.
Any help is greatly appreciated!
Mayur Maheshwari - Techno-Functional Consultant Odoo (Openerp): Send Mail In Openerp With Mail Templates >>>>> Download Now
Delete>>>>> Download Full
Mayur Maheshwari - Techno-Functional Consultant Odoo (Openerp): Send Mail In Openerp With Mail Templates >>>>> Download LINK
>>>>> Download Now
Mayur Maheshwari - Techno-Functional Consultant Odoo (Openerp): Send Mail In Openerp With Mail Templates >>>>> Download Full
>>>>> Download LINK sL
Exillent!!
ReplyDeleteCan we do the same for webkit reports too? For example webkit partner ledger.
ReplyDeleteAny answer to my question? Anyone?
DeleteNot getting you . can you elaborate more ?
DeleteI asked that can we create an email template for partner_ledger webkit that is sent to each partner automatically to their email ids and the report attached as partner's name.pdf?
DeleteYes you can ! You need to create one scheduler and write python code in server action so it will call email template and also execute automatically on basis of scheduler action.
DeleteThe email contains the fieldnames and not the content. Do you have any ideas how to solve that?
ReplyDeleteEmail templates contains a field names that's feature or we can say it's beauty of email template we can customize it with any fields which are including in our object as we want in our email template. Once email is send it will display the whole value of of all related fields in that email.
DeleteThank you Mayur. This works!
DeleteWelcome
DeleteIncludes the fields using the Dynamic Value Builder, but when I open the template through the button that was the object-inclusive, it presents the fields that insert using the Dynamic Value Builder. So if I put the field ${object.company_id.name}, he does not have the value that it brings within the object but the field declaration.
ReplyDeleteCan someone help me please? thank you
Hello,
ReplyDeleteFollowed above steps for my module latest_base. However system displays following error
AttributeError: 'latest_base' object has no attribute 'message_post'
Any idea to fix this issue.. Thanks
In Your Module latest_base you missed to add inherit mail.thread object .
DeleteAdd it and check it again.
_inherit = ['mail.thread']
Thanks Mayur . Can you help me on this requirement ?
DeleteSystem should pops up message saying that " Mail has been sent OR Mail couldn't send at this point of time
Yes need some customization contact me on : mayurmaheshwari07@gmail.com
DeleteThank you. Mayur Mahesh. I sent an email to you with my requirement
DeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteAs per the above steps i have configured the email template.But in the body of the content is not displaying during receiving mail .Kindly guide me to solve this issue.
ReplyDeleteCheck your mail template , Just make sure all fields you are accessing through the dynamic view builder is there in your model , if you find any fields wrong then it will not showing your template in mail body :
DeleteThanks,
Mayur Maheeshwari
OpenERP/Odoo
Skype: mayur_maheshwari1
Hi.
ReplyDeleteI want to create a Email Template Using Python Script.
How Can I Create That?
Odoo Office 365 mails has many benifits such as:
Delete1.Manageable through a single console along with other Ksolves Office 365 apps
2.Makes use of powerful features of Office 365 Base
3.Sync email based on the number of days assigned
4.Advanced search and filter mechanisms for logs analysis.
5.Separate views for the previously sent or inbox mail
I want to pass an html string to a template and use that in that template. Infact what i need is to display a previously sent mail's body from mail.message and display in new mail. I have achieved that, but my html syntax is not rendered but shown as the source code itself. What should i do?
ReplyDeleteSend me your mail template i think if you did any mistake while creating template then it will showing you source code. verify your source code or send to me i will check from my side : you can reach me for OpenERP mail template on this gmail : mayurmaheshwari07@gmail.com or skype :- mayur_maheshwari1
DeleteI only can send email from admin account, if i connect with other user with all permissions, the email is never sent
ReplyDeletePlease check users access rights is given properly or not ?
DeleteHi,,
ReplyDeleteCan you please tell me programmatically , which API should we use to achieve "Send By Email" functionality ?
HI,
ReplyDeleteMay I know how to add CC(email_cc) and Bcc(email_bcc) fields in odoo8 email template.
It is available in OpenERP6.1 but I could not see these fields label in Odoo8.
Can anyone help me?
Hello,
ReplyDeletecan you please tell me how to set amount_total value precision in last two digit like 5.00.
HI Parikshit,
DeleteIf you creating a new fields then set a decimal_precision in your fields and then set a decimal precision digit 2 from Settings/Technical/Database Structure/Decimal Accuracy. if this fields is allredy exits then check decimal precision and apply 2 digit on it. Hope it Helps
Hello, can I add multiple recipient email from my customer? I'm trying to figure it out, but still can't make it. Any suggestion?
ReplyDeleteYou can add multiple recipients by this way. ie)'x@gmail.com,y@gmail.com,z@gmail.com'
DeleteThank you for the information, I think this article is very useful for all who read it.
ReplyDelete.
Thanks for you nice comments !
DeleteThis comment has been removed by the author.
ReplyDeleteHI,
ReplyDeleteMay I know how to add Bcc(email_bcc) fields in odoo7 email template.
Can anyone help me?
Its a great pleasure reading your post.Its full of information I am looking for and I love to post a comment that "The content of your post is awesome" Great work.
ReplyDeletefree newsletter templates
Hello Mayur, I´m using Odoo V10 on AWS and I´m trying to send invoice by the email template but it is failing with the following message:
ReplyDelete"Fail the process of the tempale using the values {'format_tz: at 0x7efc4687fc80>, 'ctx': {u'uid': 1, 'button_access': {'url':'/mail/view?message_id=17273, ..... etc. etc.
Could you please help to solve this issue. Thank you in advance.
HI,
DeleteAre you rendering date field in your invoice template ? or format_tz to render date. then try to render datetime field by below ${format_tz(object.invoice_date+ ' 00:00:00', format= '%d/%b/%Y')}
Hope it works for you.
Hi Mayur, thank you for your prompt response. I'm using original system and I've not change anything, probably the original image comes with this error. Where can I get this sentence or definition you are talking about. Thanks.
DeleteHi Mayur,
ReplyDeleteI am trying to implement send message in ios app but It seems not working. Can you help me to findout the issue? here is my problem description..
http://stackoverflow.com/questions/43292451/how-to-send-message-programatically-from-odoo-using-xmlrpc
Ksolves Office 365 Mails Connector makes your life a lot simpler by enabling Odoo CRM Email Integration. It lets you choose through a simple click to sync mails from Outlook to Odoo. Combined with Ksolves Office 365 Base features, it provides a way to comprehensively Odoo email configuration from Office 365 to Odoo. You can buy best Odoo Office 365 Email Integration App at Ksolves Store.
ReplyDeleteWork with all the applications that you have been using all these years, along with the benefits of the smart integration features. Streamline all your office tasks and business processes efficiently and conveniently by integrating them with Odoo Office 365. Get the best-in-class productivity by the two-way connection between people and information.
ReplyDeleteMayur Maheshwari - Techno-Functional Consultant Odoo (Openerp): Send Mail In Openerp With Mail Templates >>>>> Download Now
ReplyDelete>>>>> Download Full
Mayur Maheshwari - Techno-Functional Consultant Odoo (Openerp): Send Mail In Openerp With Mail Templates >>>>> Download LINK
>>>>> Download Now
Mayur Maheshwari - Techno-Functional Consultant Odoo (Openerp): Send Mail In Openerp With Mail Templates >>>>> Download Full
>>>>> Download LINK C0
Really good work there. Informative and helpful. Appreciate it. But might be looking for Odoo ERP Development in Pennsylvania
ReplyDeleteThanks for sharing for the nice blog. You made this beneficial with your skill and talent. You also can share some suggestions on Odoo Erp System.
ReplyDeleteThanks and I have a swell offer you: How Many Home Renovation Shows Are There home addition contractor
ReplyDelete