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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客戶關係
- e-Commerce
- 會計
- 庫存
- PoS
- Project
- MRP
此問題已被標幟
1
回覆
1261
瀏覽次數
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 |