Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
2161 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
1
Mei 24
3715
3
Mar 25
7810
0
Mei 22
3187
2
Jul 25
2208
0
Jun 25
494