summaryrefslogtreecommitdiff
path: root/addons/point_of_sale/static/src/js
diff options
context:
space:
mode:
authorJoseph Caburnay <jcb@odoo.com>2020-10-27 08:42:24 +0000
committerJoseph Caburnay <jcb@odoo.com>2020-10-27 09:18:29 +0000
commit025d2c9685af74f7ef00530966cb5fb306a31085 (patch)
tree9b2915c342c3a16f071a9a25e6a9b7fabf65a98e /addons/point_of_sale/static/src/js
parentd8790cce3e4a23d2b6b1c32d48d5df14fbdcfd33 (diff)
[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#60793 Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Diffstat (limited to 'addons/point_of_sale/static/src/js')
-rw-r--r--addons/point_of_sale/static/src/js/Screens/ClientListScreen/ClientDetailsEdit.js5
1 files changed, 5 insertions, 0 deletions
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 });
}