Skip to content

Commit

Permalink
[FIX] point_of_sale: flush order timeout
Browse files Browse the repository at this point in the history
When an order is synchronized to the server, there is a timeout of 7.5
seconds that is left before considering that the order has not been
synchronized, and should be re-syncronised.

Since syncronization of order in pos_restaurant have been made, there
are more operations than before that are performed, and the
synchronization of an order can take more than that.

The validation of a picking can also take a lot of time, almost when
products are kits and compose of multiple products.

The problem, is that if it takes more than 7.5, the same order will be
pushed again to the server, even if the previous sychro still running,
which will lead to wait the previous request that has the lok on the
same records, all this blocked request can lead to block all workers of
the server because all requests are trying to modify same objects.

So we've increased the timout for flushed orders.

closes odoo#44600

Signed-off-by: Olivier Dony (odo) <[email protected]>
  • Loading branch information
pimodoo committed Feb 4, 2020
1 parent 1ba501d commit 9452c3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/point_of_sale/static/src/js/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ exports.PosModel = Backbone.Model.extend({
options = options || {};

var self = this;
var timeout = typeof options.timeout === 'number' ? options.timeout : 7500 * orders.length;
var timeout = typeof options.timeout === 'number' ? options.timeout : 30000 * orders.length;

// Keep the order ids that are about to be sent to the
// backend. In between create_from_ui and the success callback
Expand Down

0 comments on commit 9452c3f

Please sign in to comment.