Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
20236 Vizualizări

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 :)

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează

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

Cel mai bun răspuns

I have the same issue! Help pls!!

Imagine profil
Abandonează

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

Related Posts Răspunsuri Vizualizări Activitate
0
nov. 22
2938
1
oct. 22
5742
0
mar. 19
3401
3
apr. 25
1341
1
ian. 25
1939