it is possible to make it mandatory to choose a customer before validating the payment in POS?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
Hi
Try this code:
const PaymentScreen = require('point_of_sale.PaymentScreen');
const Registries = require('point_of_sale.Registries');
const PosDeResPaymentScreen = PaymentScreen => class extends PaymentScreen {
//@Override
async validateOrder(isForceValidate) {const currentPartner = this.currentOrder.get_client();
if (currentPartner == null) {
await this.showPopup('ErrorPopup', {
title: _t('Unknown'),
body: _t("Choose Customer First."),
});
}
await super.validateOrder(...arguments);
}, Registries.Component.extend(PaymentScreen, PosDeResPaymentScreen);
return PaymentScreen;
});
Hope it helps
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
3
9月 25
|
235 | ||
|
0
10月 24
|
1741 | ||
|
1
11月 22
|
5652 | ||
|
1
3月 15
|
5168 | ||
|
1
2月 22
|
6296 |