Reputation: 1659
In my custom room booking application, when user book a room a mail will send to the admin. In the mail template, there is an approve button. Once the admin clicks the approve button, it should redirect to the approval form view. How can I do that by placing a link in the email template?
Upvotes: 2
Views: 3996
Reputation: 6119
You can put in your template a text ${ctx['url']} and then render send template with template.with_context(url=url).send_mail(self.id)
. ${ctx['url']}
will be replaced with url you passed along with context.
Upvotes: 1
Reputation: 2393
The url you have to compose is of the following form:
http://odoo.server.com/web?db=#id=&view_type=form&model=
Upvotes: 2