İçereği Atla
Menü
This question has been flagged
1 Cevapla
1037 Görünümler

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
Vazgeç
Best Answer

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
Vazgeç
Related Posts Cevaplar Görünümler Aktivite
1
May 24
2626
3
Mar 25
6307
0
May 22
2653
2
May 25
317
2
May 25
982