Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3041 Visualizzazioni

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

Avatar
Abbandona
Risposta migliore

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

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
nov 23
38
1
dic 17
5533
0
feb 16
6244
3
feb 25
16613
1
apr 24
2662