Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
5 Replies
13164 Tampilan

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!

 

Avatar
Buang
Jawaban Terbai

Hello,

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

Avatar
Buang
Jawaban Terbai

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.

Avatar
Buang
Jawaban Terbai

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

Avatar
Buang
Penulis Jawaban Terbai

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...)

Avatar
Buang
Jawaban Terbai

Edit the following template:

 

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

 

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Feb 24
2497
0
Okt 23
984
1
Jul 23
3399
3
Des 23
19126
1
Feb 22
6145