Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2059 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
mai 24
3634
3
mar. 25
7671
0
mai 22
3159
2
iul. 25
2078
0
iun. 25
416