[IMP] sale: Change the label in SO mail while transaction is pending
Currently, when the payment is done by the wire transfer or by sepa then the transaction is going to be in the 'pending' state and due to that confirmation mail will display the button as 'Sign and Pay Quotation' but is should be the 'view quotation'. So in this commit we check for the last transaction and if transaction status is 'pending' then display the 'View Quatation' instead of 'Sign and Pay Quatation'. We have not modified method has_to_be_paid because it's used to display the button on portal so still it will display the 'Sign and Pay' on portal. closes odoo/odoo#49389 Taskid: 2210990 Closes: #49389 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
committed by
Barad Mahendra
parent
4ca452aacf
commit
d24758db56
@@ -59,11 +59,15 @@
|
||||
<template id="mail_notification_paynow_online" inherit_id="mail.mail_notification_paynow" name="Quotation: Sign and Pay mail notification template">
|
||||
<xpath expr="//t[@t-set='access_name']" position="after">
|
||||
<t t-if="record._name == 'sale.order'">
|
||||
<t t-set="is_transaction_pending" t-value="record.get_portal_last_transaction().state == 'pending'"/>
|
||||
<t t-if="record.has_to_be_signed(include_draft=True)">
|
||||
<t t-if="record.has_to_be_paid()" t-set="access_name">Sign & Pay Quotation</t>
|
||||
<t t-if="record.has_to_be_paid()" t-set="access_name">
|
||||
<t t-if="is_transaction_pending">View Quotation</t>
|
||||
<t t-else="">Sign & Pay Quotation</t>
|
||||
</t>
|
||||
<t t-else="" t-set="access_name">Accept & Sign Quotation</t>
|
||||
</t>
|
||||
<t t-elif="record.has_to_be_paid(include_draft=True)">
|
||||
<t t-elif="record.has_to_be_paid(include_draft=True) and not is_transaction_pending">
|
||||
<t t-set="access_name">Accept & Pay Quotation</t>
|
||||
</t>
|
||||
<t t-elif="record.state in ('draft', 'sent')">
|
||||
|
||||
Reference in New Issue
Block a user