summaryrefslogtreecommitdiff
path: root/addons/sale/data/mail_template_data.xml
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2017-09-04 16:58:29 +0200
committerThibault Delavallée <tde@odoo.com>2017-09-06 10:49:02 +0200
commit2d4c8103f9503c046e3493447876ca751b6078f7 (patch)
treef6148966143e35cccb4eb073efeb2d2e7467e09e /addons/sale/data/mail_template_data.xml
parent1925837d471514c3abf29d070f28b21aad92853e (diff)
[IMP] sale, website_quote: improve email link and wording computation
The 'View', 'Accept and Sign', 'Pay Online' buttons are now correctly computed based on the sales settings or the online quote settings. Indeed it is now possible to sign and/or pay quotations without having website_quote module installed.
Diffstat (limited to 'addons/sale/data/mail_template_data.xml')
-rw-r--r--addons/sale/data/mail_template_data.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/sale/data/mail_template_data.xml b/addons/sale/data/mail_template_data.xml
index 49c205f102b..effcd48d714 100644
--- a/addons/sale/data/mail_template_data.xml
+++ b/addons/sale/data/mail_template_data.xml
@@ -18,8 +18,8 @@
% set access_action = object.with_context(force_website=True).get_access_action()
% set is_online = access_action and access_action['type'] == 'ir.actions.act_url'
% set doc_name = 'quotation' if object.state in ('draft', 'sent') else 'order confirmation'
-% set pay_sign_name = ('require_payment' in object and object.require_payment and 'pay') or 'sign'
-% set access_name = is_online and object.template_id and object.state in ('draft', 'sent') and 'Accept and %s online' % pay_sign_name or 'View %s' % doc_name
+% set pay_sign_name = object.get_portal_confirmation_action()
+% set access_name = is_online and object.state in ('draft', 'sent') and pay_sign_name in ('pay', 'sign') and 'Accept and %s online' % pay_sign_name or 'View %s' % doc_name
% set access_url = is_online and object.get_mail_url() or ''
% if object.partner_id.parent_id: