Skip to content

Commit

Permalink
[FIX] OCA#777 pos_customer_required_fields
Browse files Browse the repository at this point in the history
In case there is no required field we don't want to
lock user on payment screen.

As required fields list is stored in string variable
spliting an empty string return an array of one empty
string which would return one missing field which
is locking users
  • Loading branch information
petrus-v authored and ppakpahan committed Jun 4, 2022
1 parent e11fb9c commit e55551d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pos_customer_required_fields/static/src/js/screens.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
@author Pierre Verkest <[email protected]>
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
*/
odoo.define('pos_order_zipcode.screens', function (require) {
odoo.define('pos_customers_required_fields.screens', function (require) {
"use strict";

var screens = require('point_of_sale.screens');

screens.PaymentScreenWidget.include({
missing_customer_fields: function(){
const customer = this.pos.get_order().get_client();
if(!customer){
if(!customer || this.pos.config.res_partner_required_fields_names === ""){
// In case customer is not required there are no missing fields
// there are some other check that ensure if customer is
// required or not, it's not the intent of this method to decide
Expand Down

0 comments on commit e55551d

Please sign in to comment.