Skip to content
Snippets Groups Projects
Commit 7dc25658 authored by Denis Ledoux's avatar Denis Ledoux
Browse files

[FIX] website_quote:

This revision is related to 7be2403c

The payment acquirers must be fetched if the quote
needs a payment.

Besides, as explained in the above revision, the state
`manual` no longer exists sales orders, and therefore
this must no longer be used to determine if a quote
needs a payment or not.

opw-660575
parent 0a7ee85c
No related branches found
No related tags found
No related merge requests found
......@@ -57,7 +57,7 @@ class sale_quote(http.Controller):
'token': token,
}
if order.require_payment or (not tx_id and order.state == 'manual'):
if order.require_payment or values['need_payment']:
payment_obj = request.registry.get('payment.acquirer')
acquirer_ids = payment_obj.search(request.cr, SUPERUSER_ID, [('website_published', '=', True), ('company_id', '=', order.company_id.id)], context=request.context)
values['acquirers'] = list(payment_obj.browse(request.cr, token and SUPERUSER_ID or request.uid, acquirer_ids, context=request.context))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment