From e380ed010eaea9069debd864a4a0ce5dd9425b48 Mon Sep 17 00:00:00 2001 From: Joseph Caburnay Date: Tue, 27 Oct 2020 08:42:24 +0000 Subject: [PATCH] [FIX] point_of_sale: empty name check when editing customer info User is not allowed to save an empty name for the customer details. If tried, an error message is shown. This feature has been accidentally dropped after the pos-owl-refactoring. We are restoring this behavior in this commit. closes odoo/odoo#60813 X-original-commit: 025d2c9685af74f7ef00530966cb5fb306a31085 Signed-off-by: pimodoo Signed-off-by: Joseph Caburnay (jcb) --- .../src/js/Screens/ClientListScreen/ClientDetailsEdit.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/point_of_sale/static/src/js/Screens/ClientListScreen/ClientDetailsEdit.js b/addons/point_of_sale/static/src/js/Screens/ClientListScreen/ClientDetailsEdit.js index 3c81482f335..c50ea05f991 100644 --- a/addons/point_of_sale/static/src/js/Screens/ClientListScreen/ClientDetailsEdit.js +++ b/addons/point_of_sale/static/src/js/Screens/ClientListScreen/ClientDetailsEdit.js @@ -44,6 +44,11 @@ odoo.define('point_of_sale.ClientDetailsEdit', function(require) { processedChanges[key] = value; } } + if (!processedChanges.name) { + return this.showPopup('ErrorPopup', { + title: _('A Customer Name Is Required'), + }); + } processedChanges.id = this.props.partner.id || false; this.trigger('save-changes', { processedChanges }); }