Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2558 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
lis 23
38
1
gru 17
4860
0
lut 16
5645
3
lut 25
14301
1
kwi 24
2093