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:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
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
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
0
paź 24
|
1346 | ||
|
1
lis 22
|
5221 | ||
|
1
mar 15
|
4882 | ||
|
1
lut 22
|
2638 | ||
|
1
sty 22
|
2612 |