diff options
| author | Antoine Prieels <anp@odoo.com> | 2020-01-29 13:31:59 +0000 |
|---|---|---|
| committer | Pierre Masereel <pim@odoo.com> | 2020-09-29 11:44:46 +0000 |
| commit | 761639b56b0c9210c77e277f01cea45725b82ef6 (patch) | |
| tree | aff1ca3a4b846d774f86c163a2801b39b2f38149 /addons/pos_adyen/static | |
| parent | c7414488602d12ea91a18d3b6df69f4612b66e70 (diff) | |
[REV] pos_adyen: avoid concurrent updates
Revert commit e6372c3, the concurrent updates were solved by the change
in the order of the lines, not by the fact that functions were defined
as api.model
Diffstat (limited to 'addons/pos_adyen/static')
| -rw-r--r-- | addons/pos_adyen/static/src/js/models.js | 2 | ||||
| -rw-r--r-- | addons/pos_adyen/static/src/js/payment_adyen.js | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/addons/pos_adyen/static/src/js/models.js b/addons/pos_adyen/static/src/js/models.js index 6865f795733..f2734e00a94 100644 --- a/addons/pos_adyen/static/src/js/models.js +++ b/addons/pos_adyen/static/src/js/models.js @@ -3,5 +3,5 @@ var models = require('point_of_sale.models'); var PaymentAdyen = require('pos_adyen.payment'); models.register_payment_method('adyen', PaymentAdyen); -models.load_fields('pos.payment.method', ['adyen_terminal_identifier', 'adyen_test_mode', 'adyen_api_key']); +models.load_fields('pos.payment.method', 'adyen_terminal_identifier'); }); diff --git a/addons/pos_adyen/static/src/js/payment_adyen.js b/addons/pos_adyen/static/src/js/payment_adyen.js index df63ec49bdd..82c6a9f91ea 100644 --- a/addons/pos_adyen/static/src/js/payment_adyen.js +++ b/addons/pos_adyen/static/src/js/payment_adyen.js @@ -48,7 +48,7 @@ var PaymentAdyen = PaymentInterface.extend({ return rpc.query({ model: 'pos.payment.method', method: 'proxy_adyen_request', - args: [data, this.payment_method.adyen_test_mode, this.payment_method.adyen_api_key, test_endpoint, live_endpoint], + args: [[this.payment_method.id], data, test_endpoint, live_endpoint], }, { // When a payment terminal is disconnected it takes Adyen // a while to return an error (~6s). So wait 10 seconds @@ -174,11 +174,7 @@ var PaymentAdyen = PaymentInterface.extend({ return rpc.query({ model: 'pos.payment.method', method: 'get_latest_adyen_status', - args: [this.payment_method.id, - this._adyen_get_sale_id(), - this.payment_method.adyen_terminal_identifier, - this.payment_method.adyen_test_mode, - this.payment_method.adyen_api_key], + args: [[this.payment_method.id], this._adyen_get_sale_id()], }, { timeout: 5000, shadow: true, |
