콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
4583 화면

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.

아바타
취소