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
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
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
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
0
Okt 24
|
1367 | ||
|
1
Nov 22
|
5240 | ||
|
1
Mar 15
|
4890 | ||
|
1
Feb 22
|
2807 | ||
|
1
Jan 22
|
2637 |