跳至內容
選單
此問題已被標幟
1 回覆
1261 瀏覽次數

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
5月 24
2804
3
3月 25
6604
0
5月 22
2839
2
5月 25
543
2
5月 25
1244