Help

欢迎!

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


0

Remove "View Request for Quotation" button from e-mails

Avatar
odoo
Avatar
Discard
2 Answers
0
Avatar
odoo
Best Answer

Thanks for your solve.

I have a same problem, I'll try.

Avatar
Discard
0
Avatar
odoo
Best Answer

For anyone else having this issue, here is how I was able to resolve it.

Configured my templates (po, rfq, sale, invoice) to include author signature.

Created a new module that: 

a) creates a blank template without the header and footer ( original template defined in mail/data/mail_data.xml ):

<odoo>
    <data>
        <template id="mail_notification_paynow" name="Mail: Pay Now mail notification template">
            <t t-raw="message.body"/>
        </template>
    </data>
</odoo> 

b) updates the sale, purchase and accounting modules to use this new template:

# -*- coding: utf-8 -*-
from odoo import api, models
class PurchaseOrder(models.Model):
    _inherit = "purchase.order"
    @api.multi
    def action_rfq_send(self):
        res = super(PurchaseOrder, self).action_rfq_send()
        res['context']['custom_layout'] = "remove_email_footer.mail_notification_paynow"
        return res
class SaleOrder(models.Model):
    _inherit = "sale.order"
    @api.multi
    def action_quotation_send(self):
        res = super(SaleOrder, self).action_quotation_send()
        res['context']['custom_layout'] = "remove_email_footer.mail_notification_paynow"
        return res
class AccountInvoice(models.Model):
    _inherit = "account.invoice"
    @api.multi
    def action_invoice_sent(self):
        res = super(AccountInvoice, self).action_invoice_sent()
        res['context']['custom_layout'] = "remove_email_footer.mail_notification_paynow"
        return res


Avatar
Discard