[FIX] point_of_sale: invoice not created in backend

Missing arguments that lead to the invoice not created in the backend (opw 609470).
This commit is contained in:
dhr-odoo 2014-07-01 16:50:59 +05:30 committed by Martin Trigaux
parent 9106d61ae8
commit 60699cd714
1 changed files with 4 additions and 3 deletions

View File

@ -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