[FIX] payment: Remove lang when creating payment transaction

- Having a lang set when trying to create a payment transaction can cause issues due to uninstalled langs on the database.
This commit is contained in:
Toufik Benjaa
2018-05-24 19:24:26 +02:00
parent 56e3100a0b
commit b2aab354c4
+2 -2
View File
@@ -92,7 +92,7 @@ class WebsitePayment(http.Controller):
'type': 'form_save' if acquirer.save_token != 'none' and partner_id else 'form',
}
tx = request.env['payment.transaction'].sudo().create(values)
tx = request.env['payment.transaction'].sudo().with_context(lang=None).create(values)
request.session['website_payment_tx_id'] = tx.id
render_values = {
@@ -122,7 +122,7 @@ class WebsitePayment(http.Controller):
'type': 'form_save' if token.acquirer_id.save_token != 'none' and partner_id else 'form',
}
tx = request.env['payment.transaction'].sudo().create(values)
tx = request.env['payment.transaction'].sudo().with_context(lang=None).create(values)
request.session['website_payment_tx_id'] = tx.id
try: