Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
2042 Tampilan

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
Buang
Jawaban Terbai

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
Buang

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!

Post Terkait Replies Tampilan Aktivitas
2
Feb 24
1560
2
Agu 24
3502
0
Mar 24
909
2
Jan 24
1397
1
Nov 23
1803