From 1279f82e128169a7e244f5eb44352e36ac810a10 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Mon, 6 Mar 2017 13:23:49 +0100 Subject: [PATCH] [FIX] sale: sales order email template without portal_sale When disabling the customer portal in the general settings (or uninstalling the `portal_sale` module directly), the model `sale.order` no longer has a method `get_signup_url`, and it therefore leads to the fail of the email template rendering which is still referencing this method. Besides, the `access_url` is actually used only if `is_online` is True, (see the `% if is_online:` few lines later) and in this case `get_signup_url` was not used at all. Therefore, we can assume `None` is a good alternative, as the resul of `get_signup_url` was actually no longer used. opw-710481 --- addons/sale/data/mail_template_data.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/data/mail_template_data.xml b/addons/sale/data/mail_template_data.xml index 29da823b281..9e541f56ab3 100644 --- a/addons/sale/data/mail_template_data.xml +++ b/addons/sale/data/mail_template_data.xml @@ -19,7 +19,7 @@ % set doc_name = 'quotation' if object.state in ('draft', 'sent') else 'order confirmation' % set is_online = access_action and access_action['type'] == 'ir.actions.act_url' % set access_name = is_online and object.template_id and 'Accept and pay %s online' % doc_name or 'View %s' % doc_name -% set access_url = is_online and access_action['url'] or object.get_signup_url() +% set access_url = is_online and access_action['url'] or None % if object.partner_id.parent_id: (${object.partner_id.parent_id.name})