Openbravo Issue Tracking System - POS2
View Issue Details
0048993POS2Restaurantspublic2022-04-06 17:252022-05-04 09:56
timothee_catteeuw 
meriem_azaf 
normalcriticalalways
closedfixed 
5
 
 
No
0048993: JIRA 2863 - Impossible to select on WebPOS products containing modifiers group created for several organizations
There is a blocking error on WebPos when wanting to add a product which has modifiers group in 2 different organizations

In that case the following error is observed in the browser :

Cannot read properties of undefined (reading 'id'); line: s (https://agapes-fs-u18-test.cloud.openbravo.com/openbravo/web/pos/static/js/main.82993889.chunk.js:1:14844 [^]) (*)
(anonymous) @ POS2.js:3657
i @ POS2.js:4346
(anonymous) @ POS2.js:4375
s @ ErrorHandler.js:28
await in s (async)
(anonymous) @ getUserAction.js:40
await in (anonymous) (async)
(anonymous) @ UserActionEvents.js:33
onClick @ BaseButton.jsx:86
He @ react-dom.production.min.js:52
Ke @ react-dom.production.min.js:52
(anonymous) @ react-dom.production.min.js:53
Sr @ react-dom.production.min.js:100
_r @ react-dom.production.min.js:101
(anonymous) @ react-dom.production.min.js:113
ze @ react-dom.production.min.js:292
(anonymous) @ react-dom.production.min.js:50
Mr @ react-dom.production.min.js:105
Zt @ react-dom.production.min.js:75
Gt @ react-dom.production.min.js:74
t.unstable_runWithPriority @ scheduler.production.min.js:18
Hi @ react-dom.production.min.js:122
Ae @ react-dom.production.min.js:292
Xt @ react-dom.production.min.js:73
onDrag @ usePagination.js:374
(anonymous) @ useGesture.ts:118
(anonymous) @ Recognizer.ts:284
(anonymous) @ DragRecognizer.ts:177
Create 2 modifiers group in Modifiers group window :

CookingLevel having 3 selectable values (Rare / Medium / Well done) at france organization level and assign a product to it

CookingLevel having 3 selectable values (Rare / Medium / Well done) at a store level (this store has to be included to france organization level and assign the same product to it

Go to a web POS which belongs to a store which is not the store used for the second modifier group and refresh your masterdata

Try to add the product → the error appears and it is not possible to select the product
No tags attached.
Issue History
2022-04-06 17:25timothee_catteeuwNew Issue
2022-04-06 17:25timothee_catteeuwAssigned To => Retail
2022-04-06 17:25timothee_catteeuwTriggers an Emergency Pack => No
2022-04-25 18:06AugustoMauchAssigned ToRetail => meriem_azaf
2022-04-25 18:06AugustoMauchStatusnew => scheduled
2022-04-27 15:35hgbotNote Added: 0136809
2022-05-04 09:56hgbotNote Added: 0136925
2022-05-04 09:56hgbotResolutionopen => fixed
2022-05-04 09:56hgbotStatusscheduled => closed
2022-05-04 09:56hgbotNote Added: 0136926
2022-08-25 16:59mtaalRelationship addedrelated to 0049252

Notes
(0136809)
hgbot   
2022-04-27 15:35   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/940 [^]
(0136925)
hgbot   
2022-05-04 09:56   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/940 [^]
(0136926)
hgbot   
2022-05-04 09:56   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 6021f0e5c2899dc9f2e7ca5b0650215991a18707
Author: Meriem Azaf <meriem.azaf@openbravo.com>
Date: 04-05-2022 09:50:47
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/6021f0e5c2899dc9f2e7ca5b0650215991a18707 [^]

Fixes ISSUE-48993: JIRA 2863 - Modifiers group
Impossible to select on WebPOS products containing modifiers group created for several organizations.
The problem that this function getModifierGroupsByProductInTheAssortment return to us all the modifiers groups that not belong to the current organization.
To fix this, we added another filter in the same function to select just the modifiers groups that belong to the current organization.

---
M src/org/openbravo/pos2/master/modifier/ModifierGroupProduct.java
---