Odooers论坛

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

Remove view invoice button from email template.

形象
odoo
形象
丢弃
7 答案
0
形象
odoo
最佳答案

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 备注
形象
丢弃
形象
odoo
-

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

0
形象
odoo
最佳答案

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

形象
丢弃
0
形象
odoo
最佳答案

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 备注
形象
丢弃
形象
odoo
-

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
形象
odoo
最佳答案

Hi I find a better solution than  Wojciech Nadobnik to solve this issue by adding only 2 words

In settings->user interface->views, search for "Mail: Pay Now mail notification template"

Find and add "false and " like I write below in "bold" :

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


So if you need to cancel your choice, you only have to delete "false and "

Best regards

形象
丢弃
0
形象
odoo
最佳答案

Actually I found a much easier solution.
Although it concerns editing a small part of the source code, within Odoo(14).
In developer mode go to settings>Technical>User Interface>views
Filter "notification"
Edit the view "Purchase: Confirmation mail notification template".
Delete the following part of code below:



And you're done. The button in ALL mails is gone. In quotation, order, purchase order etc.
Mind you, this is absolutely not the prettiest way but only the fastest way to a solution.




形象
丢弃
0
形象
odoo
最佳答案

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

形象
丢弃
0
形象
odoo
最佳答案

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 注释
形象
丢弃
形象
odoo
-

Got the same issue... any solution?