Help

0

Remove view invoice button from email template.

Avatar
Joris Bakx

When I send an invoice there appears an purple button in the email that gets send to the customer. I cannot find the button in a template so I wonder is there a way to remove this button? 

Avatar
Discard
5 Answers
1

Hi Joris,

You can remove the button part of the code in the e-mail template that is named "Invoicing: Invoice email". You can find it under Settings > Technical > E-mail > Templates (needs developer mode on) and by then searching on the name "Invoicing: Invoice email". Open up the template and then click on the translation button at the right:


This will open up all translations for this e-mail template. Find the term for your language and edit the field "Translation value". In this column remove the part for the button (which is between the % if is_online) statement:


Finally save the translation, reload the page and you'll see that the button is gone from the e-mail now.
P.S: You will need to do this for all your languages that are not English. The e-mail that is being sent is defined by the language set on the customer so it will render that translation.

Regards,
Yenthe

1 Comment
Avatar
Discard
Avatar
Maureen
-

Got the same issue as Grip ICT... any solution?

3
Avatar
Wojciech Nadobnik
Best Answer

Hello there,

I was dealing with the same trouble, and I've realized there is another way to remove the button (without source code edition). You just have to enter developer mode, then go for technical settings->user interface->views, search for "  Mail: Pay Now mail notification template" and remove code lines in question.

Best regards,

Wojciech Nadobnik

Avatar
Discard
1
Avatar
daan curvers
Best Answer

Hi, 

I have the same problem as Grip ICT and Maureen: the part with  % if is_online is not in the template, but the button stil shows up. 

Wouldnt be so much of a problem, but the link on the button is leading to a Page not Found error, so we really cant use the mail feature right now. 

Any help would be appreciated!

1 Comment
Avatar
Discard
Avatar
daan curvers
-

OK, I have found a solution (meddling with the source code, however):

The base template for the mails is in /addons/mail/data/mail_data.xml

There, I deleted:

"<div t-if="is_online and not record._context.get('proforma')" style="margin: 32px 0px 32px 0px; text-align: center;">

<a t-att-href="access_url"

style="background-color: #875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px; font-size:13px;">

<t t-esc="access_name"/>

</a>

</div>

<div style="margin: 0px; padding: 0px; font-size:13px;">

Best regards,

</div>

"

(starting at line number 259; in template "Mail: Pay Now mail notification template")

Then, you have to 'upgrade' the mail module (goto apps -> search for mail -> three dots -> select 'Upgrade').

As stated above: this is meddling with the source code, something I don't recommend, but I don't have the knowledge, nor the skills, to override this with a custom module :-)

0
Avatar
Joris Bakx
Best Answer

Hi guys,

I didnt resolve the issue because i cant find the translate button. What I did find was this https://jorisbakx.stackstorage.com/s/pFc2WpIF97Mqe19

But when i try to delete access_url it gives a warning that I cant delete this column.

How do I delete this? If I need to use Phyton please give a specific answer (not the best programmer).


Kind regards,

Joris Bakx

Avatar
Discard
0
Avatar
Gripict BV
Best Answer

Hi guys,

I would also like to remove that button but somehow in my odoo system i don't see "Invoicing: Invoice email". If i search for invoice i have to templates. see below image.

If i than open Invoice: Send by email and press Edit and press that translate button is see the options and field you also stated. 

But the part (which is between the % if is_online) is not there. But still the customer gets an email with that button in it.

What am i doing wrong.

Br, Norbert

sorry, somehow i cannot add images to this answer!! please see remarks with links to the 1st and the 2nd image.


3 Comments
Avatar
Discard
Avatar
Maureen
-

Got the same issue... any solution?