[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
This commit is contained in:
Denis Ledoux
2017-06-06 10:30:18 +02:00
committed by Nicolas Martinelli
parent 711530e036
commit 175a5d7808
+1 -1
View File
@@ -18,7 +18,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
<p>Dear
% if object.partner_id.is_company and object.child_ids: