"View Invoice"
And then it says the invoice name and price
At the top of my invoice email, this appears.
I want to get rid of it.
I've done extensive research but can't find any actual solution
Odoo 17 Community
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
"View Invoice"
And then it says the invoice name and price
At the top of my invoice email, this appears.
I want to get rid of it.
I've done extensive research but can't find any actual solution
Odoo 17 Community
Hello Daniele Buatti,
I hope you're doing well.
To remove "View Invoice" button in Email please add below python code of snippet in your custom add-on.
-----------// Code In Comment ----------------
I Hope this information proves helpful to you.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
from bs4 import BeautifulSoup
class MailMail(models.Model):
_inherit = 'mail.mail'
def _send_prepare_values(self, partner=None):
res = super()._send_prepare_values(partner=partner)
body_html = res.get('body', '')
model = self.model or self.env.context.get('model') or self.env.context.get('active_model')
if body_html and model in ['account.move']:
soup = BeautifulSoup(body_html, 'html.parser')
table_div = soup.find('div', {'summary': 'o_mail_notification'})
if table_div:
main_table = table_div.find('table', {'role': 'presentation'})
if main_table:
rows = main_table.find_all('tr')
if len(rows) > 2:
nested_table = rows[2].find('table')
if nested_table:
button_td = nested_table.find('td', style=lambda value: value and 'background: #222222' in value)
if button_td:
button_td.decompose()
res['body'] = str(soup)
return res
Hi,
We have an option for edit email templates.
1.Go to settings
2.Search email templates in search bar
3.Navigate to the list view of the email templates.
4.Find the invoice sending email template and edit there
Hope it helps
Create an account today to enjoy exclusive features and engage with our awesome community!
Üye Ol
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.