0
2 答案
0
最佳答案
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