Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
2155 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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!

Ảnh đại diện
Huỷ bỏ

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!

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 2 24
1639
2
thg 8 24
4021
0
thg 3 24
953
2
thg 1 24
1951
1
thg 11 23
2127