From 3ee40854181d6e0cabdbad12d3cba7fc9aa7880f Mon Sep 17 00:00:00 2001 From: sheetalPatil Date: Mon, 9 Jul 2018 16:50:36 +0530 Subject: [PATCH] [ADD]:Added Upstream patch for payment --- addons/payment/controllers/portal.py | 4 +- addons/payment/data/payment_acquirer_data.xml | 6 +- addons/payment/models/__init__.py | 1 + addons/payment/models/chart_template.py | 14 ++++ addons/payment/models/payment_acquirer.py | 73 ++++++++++++++++++- addons/payment/static/src/js/payment_form.js | 8 +- addons/payment/views/payment_views.xml | 6 +- 7 files changed, 102 insertions(+), 10 deletions(-) create mode 100644 addons/payment/models/chart_template.py diff --git a/addons/payment/controllers/portal.py b/addons/payment/controllers/portal.py index 73c3cae4..cd653e79 100644 --- a/addons/payment/controllers/portal.py +++ b/addons/payment/controllers/portal.py @@ -89,6 +89,7 @@ class WebsitePayment(http.Controller): 'amount': float(amount), 'currency_id': currency_id, 'partner_id': partner_id, + 'type': 'form_save' if acquirer.save_token != 'none' and partner_id else 'form', } tx = request.env['payment.transaction'].sudo().create(values) @@ -117,7 +118,8 @@ class WebsitePayment(http.Controller): 'amount': float(amount), 'currency_id': int(currency_id), 'partner_id': partner_id, - 'payment_token_id': pm_id + 'payment_token_id': pm_id, + 'type': 'form_save' if token.acquirer_id.save_token != 'none' and partner_id else 'form', } tx = request.env['payment.transaction'].sudo().create(values) diff --git a/addons/payment/data/payment_acquirer_data.xml b/addons/payment/data/payment_acquirer_data.xml index 1996b333..8d47e1a8 100644 --- a/addons/payment/data/payment_acquirer_data.xml +++ b/addons/payment/data/payment_acquirer_data.xml @@ -3,8 +3,7 @@