Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
2162 Переглядів

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

Аватар
Відмінити
Найкраща відповідь

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

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
трав. 24
3717
3
бер. 25
7815
0
трав. 22
3188
2
лип. 25
2212
0
черв. 25
496