[FIX] Re-added code removed by al at rev 9421: website quotation email was not sent anymore.
This commit is contained in:
parent
4118f9ed0a
commit
28b20d312d
|
@ -634,6 +634,16 @@ class website_sale(http.Controller):
|
|||
# cancel the quotation
|
||||
sale_order_obj.action_cancel(cr, SUPERUSER_ID, [order.id], context=request.context)
|
||||
|
||||
# send the email
|
||||
if email_act and email_act.get('context'):
|
||||
composer_values = {}
|
||||
email_ctx = email_act['context']
|
||||
public_id = request.website.user_id.id
|
||||
if uid == public_id:
|
||||
composer_values['email_from'] = request.website.user_id.company_id.email
|
||||
composer_id = request.registry['mail.compose.message'].create(cr, SUPERUSER_ID, composer_values, context=email_ctx)
|
||||
request.registry['mail.compose.message'].send_mail(cr, SUPERUSER_ID, [composer_id], context=email_ctx)
|
||||
|
||||
# clean context and session, then redirect to the confirmation page
|
||||
request.website.sale_reset(context=context)
|
||||
|
||||
|
|
Loading…
Reference in New Issue