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
回复
2089
查看
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
|
3666 | ||
|
3
3月 25
|
7707 | ||
|
0
5月 22
|
3166 | ||
|
2
7月 25
|
2111 | ||
|
0
6月 25
|
428 |