콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
2014 화면

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
2083
0
11월 23
1389
0
5월 22
1301
1
2월 22
958