This question has been flagged
2 Replies
17511 Views

I using Odoo13.

I got a blank screen whenever try to load my POS session.

and I got this error mode on my console:


after diving up into the code, here is the snippet of the code from the error:


 
search_done_orders: function (query) {
var self = this;
return this._rpc({
  model: 'pos.order',
  method: 'search_done_orders_for_pos',
  args: [query || ''this.pos.pos_session.id],
  }).then(function (result) {
  self.orders = result;
// Get the date in local time

_.each(self.orders, function (order) {
if (order.date_order) {
  order.date_order = moment.utc(order.date_order)
  .local().format('YYYY-MM-DD HH:mm:ss');
  }
  });
  }).fail(function (error, event) {
if (parseInt(error.code, 10) === 200) {
// Business Logic Error, not a connection problem

self.gui.show_popup(
'error-traceback', {
'title': error.data.message,
'body': error.data.debug,
  }
  );
  } else {
  self.gui.show_popup('error', {
'title': _t('Connection error'),
'body': _t(
'Can not execute this action because the POS' +
' is currently offline'),
  });
  }
  event.preventDefault();
  });
},

am not sure what's wrong with that since it looks ok.

Please, any help would be very appreciated :)

Avatar
Discard
Best Answer

In V13 odoo remove jquery deferred dependency and user browser native promise object which don't contain fail function. 

promise provide catch instead of fail 

ref: https://api.jquery.com/category/deferred-object/
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise

Note: whatever third party module you are using is still in V12, it's not migrated to V13

Avatar
Discard

I am using a third party module which is created in V12 and now I have the same issue. How can I fix it?

Best Answer

I have the same issue! Help pls!!

Avatar
Discard

are you still have the issue ? please create question in forum