Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
1454 Visualizzazioni

I am trying to inherit payment button class in odoo 17 point of sale? How I override the method please some one guide me step by step what I do?. Thank you

Avatar
Abbandona
Risposta migliore

Hi,


1./** @odoo-module */


import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen";

import { patch } from "@web/core/utils/patch";


patch(PaymentScreen.prototype, {

    async validateOrder(isForceValidate) {

        //Add your code

        await super.validateOrder(...arguments);

    },

});

2. Add your js file in Correct asset bundle.

    'assets': {

        'point_of_sale._assets_pos': [

          //Add your file

        ],

     },


Hope it helps

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
mag 24
3267
3
mar 25
7182
0
mag 22
3049
0
giu 25
284
2
mag 25
784