diff options
| author | Diep Huu Hoang <mr.diephuuhoang@gmail.com> | 2017-01-24 04:01:14 +0700 |
|---|---|---|
| committer | Joren Van Onder <jov@odoo.com> | 2017-01-27 16:12:36 -0800 |
| commit | dff352acdb8b15b59bb4257814e62c4e46798739 (patch) | |
| tree | ebbdd3f3564c578e60404976a0170e8a8ae049e7 /addons/l10n_th | |
| parent | e366ee354285571efc8b4e76ce4be0572d566199 (diff) | |
[FIX] point_of_sale: prevent losing orders when validating during sync
When validating a new order in between the create_from_ui RPC call and
the corresponding callback this new order was lost. There were two
reasons for this.
First of all, the Mutex supposed to prevent multiple create_from_ui RPC
calls from happening at the same time did not return a Deferred. This is
problematic because this function gets passed to jQuery.when() which
will consider functions that do not return a Deferred to be resolved
upon return.
Secondly, the resolved callback of the create_from_ui RPC call naively
deleted all paid orders, assuming they were all successfully sent to the
backend. This is not the case when an order is added to the orders array
in between the RPC call and the callback.
Closes #15190
Diffstat (limited to 'addons/l10n_th')
0 files changed, 0 insertions, 0 deletions
