Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
2176 Näkymät

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
Hylkää
Paras vastaus

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
Hylkää

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!

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
helmik. 24
1655
2
elok. 24
4065
0
maalisk. 24
964
2
tammik. 24
1988
1
marrask. 23
2161