From 60699cd7142985fe64954e13b562c14c8c461dfb Mon Sep 17 00:00:00 2001 From: dhr-odoo Date: Tue, 1 Jul 2014 16:50:59 +0530 Subject: [PATCH] [FIX] point_of_sale: invoice not created in backend Missing arguments that lead to the invoice not created in the backend (opw 609470). --- addons/point_of_sale/static/src/js/models.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 774f0bc036a..66b9d67eeaa 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -427,14 +427,15 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal // called from within a mutex. // this method returns a deferred that always succeeds when all orders have been tried to be sent, // even if none of them could actually be sent. - _flush_all_orders: function () { + _flush_all_orders: function ( order, options) { var self = this; + orders = order || self.db.get_orders() self.set('synch', { state: 'connecting', pending: self.get('synch').pending }); - return self._save_to_server(self.db.get_orders()).done(function () { - var pending = self.db.get_orders().length; + return self._save_to_server( orders, options).done(function () { + var pending = orders.length; self.set('synch', { state: pending ? 'connecting' : 'connected', pending: pending