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

Hello everyone!

I'm trying to create a popup to open when point of sale is opened. Like "Opening cash control" popup.

I was looking for "Opening Cash Control" popup to recreate the same logic, using chrome.js to open it, but it does not work.

Do you know if I'm doing something wrong or maybe other way to do this?

thank you!!!

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

Hi,

You can use chrome.js to open it by using the openCashControl function.

Please try the following code

odoo.define('ModuleName.Chrome', function(require) {
'use strict';
const Chrome = require('point_of_sale.Chrome')

const UpdatedChrome = Chrome =>
class extends Chrome {
openCashControl(){
super.openCashControl();
this.showPopup('YourPopup', {
// Args if any
});
}
}

Registries.Component.extend(Chrome, UpdatedChrome);
 
});

Regards

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 11 23
38
1
thg 12 17
4981
0
thg 2 16
5782
3
thg 2 25
14878
1
thg 4 24
2207