diff --git a/addons/point_of_sale/static/src/app/store/models.js b/addons/point_of_sale/static/src/app/store/models.js index 9a98f16c653..bb0dcf5c091 100644 --- a/addons/point_of_sale/static/src/app/store/models.js +++ b/addons/point_of_sale/static/src/app/store/models.js @@ -1095,8 +1095,12 @@ export class Orderline extends PosModel { } findAttribute(values, customAttributes) { const listOfAttributes = []; + const addedPtal_id = []; for (const value of values){ for (const ptal_id of this.pos.ptal_ids_by_ptav_id[value]){ + if (addedPtal_id.includes(ptal_id)){ + continue; + } const attribute = this.pos.attributes_by_ptal_id[ptal_id] const attFound = attribute.values.filter((target) => { return Object.values(values).includes(target.id); @@ -1115,6 +1119,7 @@ export class Orderline extends PosModel { valuesForOrderLine: attFound, }; listOfAttributes.push(modifiedAttribute); + addedPtal_id.push(ptal_id); } } return listOfAttributes;