Skip to Content
Menu
This question has been flagged
1 Atsakyti
2130 Rodiniai

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

Portretas
Atmesti
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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
geg. 24
3686
3
kov. 25
7765
0
geg. 22
3174
2
liep. 25
2163
0
birž. 25
465