跳至内容
菜单
此问题已终结

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.

形象
丢弃
相关帖文 回复 查看 活动
2
10月 17
4325
8
7月 24
23053
0
9月 23
1427
1
9月 21
3799
0
11月 20
3268