[FIX] website_sale: variable reference
'message' variable was not always defined. Set a default value. Closes #10006
This commit is contained in:
parent
feef50adae
commit
267ab22d00
|
@ -780,16 +780,14 @@ class website_sale(http.Controller):
|
|||
'|', ('sale_order_id', '=', order.id), ('reference', '=', order.name)
|
||||
], context=context)
|
||||
|
||||
if not tx_ids:
|
||||
if order.amount_total:
|
||||
return {
|
||||
'state': 'error',
|
||||
'message': '<p>%s</p>' % _('There seems to be an error with your request.'),
|
||||
}
|
||||
else:
|
||||
state = 'done'
|
||||
message = ""
|
||||
validation = None
|
||||
|
||||
if not tx_ids:
|
||||
if order.amount_total:
|
||||
state = 'error'
|
||||
message = '<p>%s</p>' % _('There seems to be an error with your request.')
|
||||
else:
|
||||
tx = request.registry['payment.transaction'].browse(cr, SUPERUSER_ID, tx_ids[0], context=context)
|
||||
state = tx.state
|
||||
|
|
Loading…
Reference in New Issue