Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
20230 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ

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

Câu trả lời hay nhất

I have the same issue! Help pls!!

Ảnh đại diện
Huỷ bỏ

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 11 22
2936
1
thg 10 22
5738
0
thg 3 19
3396
3
thg 4 25
1312
1
thg 1 25
1938