Skip to Content
मेन्यू
This question has been flagged
1 Reply
2068 Views

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
Discard
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
Discard
Related Posts Replies Views Activity
1
मई 24
3640
3
मार्च 25
7673
0
मई 22
3159
2
जुल॰ 25
2086
0
जून 25
416