[FIX] website_sale: translated terms payment status
Payment status (website_sale confirmation page) inject a status message, which was not set to be translatable. It should be the case.
This commit is contained in:
parent
586b0e2f5d
commit
474eae9a43
|
@ -685,7 +685,7 @@ class Ecommerce(http.Controller):
|
||||||
if not order:
|
if not order:
|
||||||
return {
|
return {
|
||||||
'state': 'error',
|
'state': 'error',
|
||||||
'message': '<p>There seems to be an error with your request.</p>',
|
'message': '<p>%s</p>' % _('There seems to be an error with your request.'),
|
||||||
}
|
}
|
||||||
|
|
||||||
tx_ids = request.registry['payment.transaction'].search(
|
tx_ids = request.registry['payment.transaction'].search(
|
||||||
|
@ -697,7 +697,7 @@ class Ecommerce(http.Controller):
|
||||||
if order.amount_total:
|
if order.amount_total:
|
||||||
return {
|
return {
|
||||||
'state': 'error',
|
'state': 'error',
|
||||||
'message': '<p>There seems to be an error with your request.</p>',
|
'message': '<p>%s</p>' % _('There seems to be an error with your request.'),
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
state = 'done'
|
state = 'done'
|
||||||
|
@ -707,14 +707,14 @@ class Ecommerce(http.Controller):
|
||||||
tx = request.registry['payment.transaction'].browse(cr, uid, tx_ids[0], context=context)
|
tx = request.registry['payment.transaction'].browse(cr, uid, tx_ids[0], context=context)
|
||||||
state = tx.state
|
state = tx.state
|
||||||
if state == 'done':
|
if state == 'done':
|
||||||
message = '<p>Your payment has been received.</p>'
|
message = '<p>%s</p>' % _('Your payment has been received.')
|
||||||
elif state == 'cancel':
|
elif state == 'cancel':
|
||||||
message = '<p>The payment seems to have been canceled.</p>'
|
message = '<p>%s</p>' % _('The payment seems to have been canceled.')
|
||||||
elif state == 'pending' and tx.acquirer_id.validation == 'manual':
|
elif state == 'pending' and tx.acquirer_id.validation == 'manual':
|
||||||
message = '<p>Your transaction is waiting confirmation.</p>'
|
message = '<p>%s</p>' % _('Your transaction is waiting confirmation.')
|
||||||
message += tx.acquirer_id.post_msg
|
message += tx.acquirer_id.post_msg
|
||||||
else:
|
else:
|
||||||
message = '<p>Your transaction is waiting confirmation.</p>'
|
message = '<p>%s</p>' % _('Your transaction is waiting confirmation.')
|
||||||
validation = tx.acquirer_id.validation
|
validation = tx.acquirer_id.validation
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue