diff options
| author | Joren Van Onder <jov@odoo.com> | 2019-08-26 12:03:05 -0700 |
|---|---|---|
| committer | Joren Van Onder <jov@odoo.com> | 2019-08-26 12:03:05 -0700 |
| commit | e6372c3cc6fef67c43768c212f1fab675c53f34c (patch) | |
| tree | 6808d7f6e3f6823622a6b217aa36483c1a350cd6 /addons/web_editor/static/src/xml | |
| parent | 8bfeedb6711a19b6d96fd7ce7d39ba64a95511b2 (diff) | |
[IMP] pos_adyen: avoid concurrent updates
Every time we check the status of a request (every 3 seconds) we also
launch another request to check the status of the terminal. This way
we can notify the user if the terminal is no longer reachable.
Even though we call Adyen's async endpoint for this it can still take
a while to complete (>2 seconds). Before this change the
pos_payment_table would be locked for this entire duration. This means
it's now likely that during this time Adyen calls us back to say the
transaction is finished. It needs to write on the payment method which
causes the concurrent update error.
Odoo's automatic retry mechanism would usually handle this fine but
it's not pretty solution.
Instead let's convert the methods that do the async call to @api.model
functions and pass in all the data they need. This solves the problem
because now we won't need to lock pos_payment_method for the duration
of the request.
Diffstat (limited to 'addons/web_editor/static/src/xml')
0 files changed, 0 insertions, 0 deletions
