Odoo Help

0

How can i access to the email template used for "Portal Access Management".

By
André Antoine
on 6/23/14, 7:46 AM 3,274 views

So you go to a customer/supplier, in "More", you can select "Portal Access Management" and invite people to use the portal, once you've done that an email is sent using an email template and the title of this email is "Your OpenERP Account at Your company". (sorry my karma is not sufficient to attach printscreen :()

I want to be able to modify this template but i can't find it.

Can somebody tell me where is this template (i know where to find the other template but this one doesn't appear there).

Thank You!

 

1
Els Van Vossel (evv)
On 6/23/14, 8:13 AM

Hello,

The text is programmed in addons/portal/wizard/portal_wizard.py

0

For odoo 10, you can open " addons/portal/wizard/portal_wizard.py" as Els wrote.

In that file, you will find:

@api.multi

    def _send_email(self):

        """ send notification email to a new portal user """

        if not self.env.user.email:

            raise UserError(_('You must have an email address in your User Preferences to send emails.'))


        # determine subject and body in the portal user's language

        template = self.env.ref('portal.mail_template_data_portal_welcome')

        for wizard_line in self:...

The template "portal.mail_template_data_portal_welcome" is named "Portal: new user" in the admin setting of the email in developper mode.


You will have to look at the user freindly emails, it seems that the name of the sender is the current user in the system. So you might have to modify the pyhon code in the file...:

def extract_email(email):

    """ extract the email address from a user-friendly email address """


We just implemented thit here and hope this is the right way to do it.

Ths is a old post, but it is the first one that come on google, so maybe this will save some one else some time.

0

The way to edit it is to change the translation from *Settings > Translations > Application Terms > Translated Terms*. Search the translated field as "addons/portal/wizard/portal_wizard.py". You will find the email template in the list. Simply enter a translation for your language (even if you use English).


Dear %(name)s,

You have been given access to %(company)s's %(portal)s.

Your login account data is:

Username: %(login)s

Portal: %(portal_url)s

Database: %(db)s

You can set or change your password via the following url:

%(signup_url)s

%(welcome_message)s

--

Odoo - Open Source Business Applications

http://www.openerp.com

0
André Antoine
On 7/3/14, 4:07 PM

Ok thank you.

If someone is interested, indeed, the text is in the code mentionned by Els. So it can't be handled from the interface like some other email template (like payment reminder mails and so on...)

-1
Med Said BARA
On 7/5/14, 5:19 PM

Edit the following template:

 

https://www.dropbox.com/s/4z215wsbz94pv38/Portal-Email-Template.png

 

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

3 follower(s)

Stats

Asked: 6/23/14, 7:46 AM
Seen: 3274 times
Last updated: 7/25/17, 3:43 PM