コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2648 ビュー

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

アバター
破棄
最善の回答

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

アバター
破棄
関連投稿 返信 ビュー 活動
0
11月 23
38
1
12月 17
4981
0
2月 16
5785
3
2月 25
14884
1
4月 24
2208