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
|
349 | ||
|
0
10月 24
|
1770 | ||
|
1
11月 22
|
5683 | ||
|
1
3月 15
|
5206 | ||
|
1
2月 22
|
6609 |