Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
2044 Vistas

Odoo Version: Odoo 16.0 Online

I would like to remove the dynamic button that displays at the top of all e-mails in odoo ( View Quote, View Invoice, View Purchase Order, Accept & Sign Quote etc...etc..) 

I believe this is hardcoded in the view Mail: mail notification layout template, please correct me if I am wrong.

I also believe that the fix is
1. Create a new view
2. Inherit the existing view
3. ????Magic X-Path code to "replace" this area

Can someone please provide the exact code I would use to remove this header?

Avatar
Descartar
Mejor respuesta

There are two templates that are used for emails:

  • mail.mail_notification_layout
  • mail.mail_notification_light

They contain <td t-if="has_button_access" ...>​ ​ and ​<t t-if="has_button_access">​, respectively. You can update this part to modify or hide the button in your emails. So inherit the templates, and use xpath to replace these sections. Alternatively, is you go to Settings > Technical > Views, and search the templates above and update here. Make sure you have developer mode enabled.


I hope this helps!

Avatar
Descartar

Thank Jort for the information!
However in the mail.mail_notification_layout_template it is not possible to change the translation, because the value is pulled from somewhere else, see line 15:

<meta itemprop="name" t-att-content="button_access['title']"/>

Do you know where I can change the value for 'title'?
Because the translation in German is a bit odd and I would like to change it.
Many thanks!

Publicaciones relacionadas Respuestas Vistas Actividad
2
feb 24
1560
2
ago 24
3502
0
mar 24
909
2
ene 24
1397
1
nov 23
1803