Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged

Hi. I modified mail.message_notification_email to add some text at the end of the notifications. It works fine when system or user sends a message to the user. The problem is when this user answer the email. The notification arrives well to the system and you can see it (per example, if the user answer a message from an order, you can see his response in the order) but when odoo try to send the email notification to the subscribers, then it fails.


Error to render compiling AST
RuntimeError: object unbound
Template: mail.message_notification_email
Path: /t/div/t[2]/t
Node: <t t-set="url" t-value="request.httprequest.host_url"/>

I use request.httprequest.host_url to have the url domain, so I can put an url, like 

<a t-attf-href="{{request.httprequest.host_url}}web/login">go to the website</a>

I tried too with request.env['ir.config_parameter'].sudo().get_param('web.base.url') but I get the same error. Why does it happen only when recipient answer and not when user backend send the message to the user? Why can I do?

Thanks.

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
říj 17
4325
8
čvc 24
23053
0
zář 23
1427
1
zář 21
3799
0
lis 20
3268