[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-03-06 13:28:14 +01:00
parent 6b3a80862c
commit 1279f82e12
+1 -1
View File
@@ -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:
(<i>${object.partner_id.parent_id.name}</i>)