跳至內容
選單
此問題已被標幟
3 回覆
8717 瀏覽次數
Hi all when I sent a quotation by email, has this button that says "View Quotation" and sent the client to the website page with his quotation info. I am not interest to use that for now so I would like to hide it or disable it. Does anyone know a fast way to do it, or is there any guide to follow? I just want to mention that I tried this solution "https://www.odoo.com/de_DE/forum/hilfe-1/question/odoo-12-quotation-sales-order-mail-has-a-link-to-the-odoo-portal-where-is-that-generated-164675" (is for Odoo 12) and didn't work (I didn't alter it, I just delete it but nothing).

Thank you all in advance !
頭像
捨棄
最佳答案

Hi,

You can try the below code to disable the View Quotation button from the mail.
First of all we need to disable the the noupdate property of the template mail_notification_paynow_online
Use the following code to set noupdate=false.

<function name="write" model="ir.model.data">
<function name="search" model="ir.model.data">
<value
eval="[('module', '=', 'sale'), ('name', '=', 'mail_notification_paynow_online')]" />
</function>
<value eval="{'noupdate': False}" />
</function>

After setting the noupdate=false, disable the mail_notification_paynow_online template.
Use the code:-

<record id="sale.mail_notification_paynow_online" model="ir.ui.view">
<field name="active">False</field>
</record>

And now you can reset the noupdate property of mail_notification_paynow_online template.

<function name="write" model="ir.model.data">
<function name="search" model="ir.model.data">
<value
eval="[('module', '=', 'sale'), ('name', '=', 'mail_notification_paynow_online')]" />
</function>
<value eval="{'noupdate': True}" />
</function>

After performing all the above steps, we need to replace the div section of the button in  mail_notification_paynow template.

<template id="mail_notification_paynow" inherit_id="mail.mail_notification_paynow">
<xpath expr="//tr[2]//div[1]" position="replace"></xpath>
</template>

Hope it helps

頭像
捨棄
最佳答案

Hi hello, i saw you get no answer in this post but i am interested in solve this problem, did you find a solution, please let me know because i have the same problem 

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
1月 23
1904
0
9月 21
2075
1
1月 20
5005
0
5月 22
2526
0
10月 21
2355