Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
2910 Tampilan

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.

Avatar
Buang
Jawaban Terbai

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;

});


Avatar
Buang
Penulis

Thanks a lot Marco

Post Terkait Replies Tampilan Aktivitas
1
Sep 25
179
0
Des 24
18
0
Nov 24
2934
0
Nov 23
2129
0
Mei 22
1899