コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
4555 ビュー

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?

アバター
破棄
著作者 最善の回答

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


アバター
破棄
最善の回答

Thanks for your solve.

I have a same problem, I'll try.

アバター
破棄