跳至内容
菜单
此问题已终结
1 回复
2627 查看

If I call a NumberPopup after another NumberPopup then the value of the first one appears as the default value in the second. This is happening even if startingValue is given in the second NumberPopup.

Any idea how to reset the number buffer after the first one?


This is in version 15 enterprise.

形象
丢弃
最佳答案

Hello, to resolve this issue I override the confirm method from de NumberPopup, then I send a 'Delete' input, this clear the buffer of the Popup. Here is the solution:

odoo.define('pos_custom.NumberPopup', function (require) {
'use strict';

const NumberPopup = require('point_of_sale.NumberPopup');
const Registries = require('point_of_sale.Registries');

const PosNumberPopup = (NumberPopup) =>
class extends NumberPopup {
constructor() {
super(...arguments);
}

confirm(event) {
super.confirm(event);
this.sendInput('Delete');
}
}

Registries.Component.extend(NumberPopup, PosNumberPopup);
return PosNumberPopup;

});


形象
丢弃
编写者

Thanks a lot Marco

相关帖文 回复 查看 活动
0
12月 24
18
0
11月 24
2667
0
11月 23
1897
0
5月 22
1742
1
2月 22
1459