Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2852 Widoki

Hi,
i am try to popup a template when user  select payment method and click on send  button ..
 as i have already created template and calling it on paymentinterface but it gives the erro "'CardNotPresent' is not found. Make sure the file is loaded and the component is properly registered using 'Registries.Component.add'"

here is the peace of code that i have added :


send_payment_request: async function (cid) {
console.log('******latest one******')
var self = this;
var PaymentLine = this.pos.get_order().selected_paymentline
var PaymentTerminal = PaymentLine.payment_method.use_payment_terminal
this._super.apply(this, arguments);
this._reset_state();
if (PaymentLine.amount <= 0) {

this._show_error(_t('Cannot process transactions with negative amount.'));
if (PaymentTerminal == 'card_not_present')
{
}
}
else if (PaymentTerminal == 'card_not_present'){
console.log('**************',this)
//
debugger;
const { confirmed } = Gui.showPopup('CardNotPresent', {
title: _t('ZilloPay Payment'),
confirmText: _t("Payment"),
cancelText: _t("Cancel"),
payment_method: this.payment_method.id,
parent: this,
token: this.pos.zillopay
});
// if (confirmed) {
// const order = this.env.pos.get_order();
// }
}
},


can anybody help me on this issue...

Awatar
Odrzuć
Najlepsza odpowiedź

Hi

You can refer to the Blog it will help to create buttons and each button action generates a popup template
https://www.cybrosys.com/blog/how-to-add-a-custom-button-in-the-pos-screen-odoo-16

Hope it helps

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
sty 25
3687
1
mar 24
325
1
wrz 23
1940
0
sty 22
906
1
lut 25
2252