コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
1455 ビュー

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
3267
3
3月 25
7184
0
5月 22
3049
0
6月 25
285
2
5月 25
785