[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 <pimodoo@users.noreply.github.com>
Signed-off-by: Joseph Caburnay (jcb) <caburj@users.noreply.github.com>
This commit is contained in:
Joseph Caburnay
2020-10-27 11:15:01 +00:00
parent 544228786c
commit e380ed010e
@@ -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 });
}