Skip to Content
Menu
This question has been flagged
2 Replies
4562 Rodiniai

We are using Odoo 12ee and we are seeing a "View Request for Quotation" button  along with the signature of the Purchase Representative when we send e-mails from the PO. We don't want this appended to all of our e-mails.

I don't see any templates or any code in Odoo that adds this and I've been debugging through breakpoints for hours. Can anyone point me in the right direction?

Portretas
Atmesti
Autorius 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


Portretas
Atmesti
Best Answer

Thanks for your solve.

I have a same problem, I'll try.

Portretas
Atmesti