How to pass url in email body?

Asked by Deven Moga

Hello,

I have set a server action to send email from the project task. Now in body of the email i am having one text like "My Task". I want to make it link so when anyone click on it should redirect to My task form of openerp. Like below example,

<a href='http://openerpinstancepath:8080/tree/open?model=ir.ui.menu&id=mytaskscreenid' target='_blank'>My Task</a>

Can anyone please tell me how can i do that?
Waiting for the valuable reply.
Thanks..

Sincerely,
Deven

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Parthiv Patel
Solved:
Last query:
Last reply:
Revision history for this message
Best Parthiv Patel (parthiv-patel-deactivatedaccount) said :
#1

Hi,

First you need to store you configuration for web access some where globaly,
either in company configuration !!! , so it can be accessed globally.

Now when u create a task for a specific user, fetch the openerp instance
path configuration from there and append
"/form/view?model=project.task&id=<task id>" to it..and send email from that
task, just add that task's id to the link

so it will be something like this

*http://openerpinstancepath:8080/form/view?model=project.task&id=<task id>*

and u can send it to the email.

Hope this will help you

Regards,

Parthiv

On Sat, May 8, 2010 at 12:55 PM, Deven Moga <
<email address hidden>> wrote:

> New question #110151 on OpenObject Addons:
> https://answers.launchpad.net/openobject-addons/+question/110151
>
> Hello,
>
> I have set a server action to send email from the project task. Now in body
> of the email i am having one text like "My Task". I want to make it link so
> when anyone click on it should redirect to My task form of openerp. Like
> below example,
>
> <a href='
> http://openerpinstancepath:8080/tree/open?model=ir.ui.menu&id=mytaskscreenid'
> target='_blank'>My Task</a>
>
> Can anyone please tell me how can i do that?
> Waiting for the valuable reply.
> Thanks..
>
> Sincerely,
> Deven
>
> --
> You received this question notification because you are an answer
> contact for OpenObject Addons.
>

--
Thanks & Regards,
Parthiv Patel

Revision history for this message
Deven Moga (erpsupport) said :
#2

Hello Parthiv,

I think you are not getting my question perfectly. I have a link which i want to send in the email. But i dont want to display that link to the receipient. Instead of that receipient can see label like "My Task" and when they click that label it should redirect to following location :

http://openerpinstancepath:8080/form/view?model=project.task&id=<task id>

Sincerely,
Deven

Revision history for this message
Parthiv Patel (parthiv-patel-deactivatedaccount) said :
#3

Hi,
for this purpose u need to send email of mime type HTML and embed the link with text. email of HTML format will help in this.

Revision history for this message
Deven Moga (erpsupport) said :
#4

Thanks Parthiv,

Its solved my problem. Thank you very much

Revision history for this message
Deven Moga (erpsupport) said :
#5

Thanks Parthiv http://techreceptives.com, that solved my question.