Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
879 Visualizzazioni

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
ott 17
4325
8
lug 24
23053
0
set 23
1427
1
set 21
3799
0
nov 20
3268