Openbravo Issue Tracking System - POS2
View Issue Details
0050681POS2[Retail Modules] Web POSpublic2022-10-28 14:242022-11-07 12:58
meriem_azaf 
meriem_azaf 
normalmajorhave not tried
closedfixed 
5
 
23Q1 
No
0050681: Error when creating a category in Keymap window
Error when creating a category in Keymap window, it doesn't take into account the organization.

Because of that, it is not possible to define :

- Different default category for each restaurant.

- Configure the same name for different categories attached to different restaurants.

1- Go to backoffice.

2- Open key map window.

3- Go to category tab included in a keymap.

4- Add a category for a specific restaurant.

ex :

Organization = FLUNCH AMIENS GLISY

Search key = TEST

Name = TEST

Default = Yes

→ OK, the category can be created.

Add a second category

Organization = FLUNCH LENS

Search key = TEST 2

Name = TEST

Default = Yes

→ KO impossible to add the category because of a second default value, Yet FLUNCH LENS has to be able to have default value and FLUNCH AMIENS GLISY another one.

Try again by changing those values :

Add a second category

Organization = FLUNCH LENS

Search key = TEST 2

Name = TEST

Default = No

→ KO impossible to add the category because of a second name = TEST, Yet FLUNCH LENS has to be able to have the same category name as FLUNCH AMIENS GLISY.
No tags attached.
Issue History
2022-10-28 14:24meriem_azafNew Issue
2022-10-28 14:24meriem_azafAssigned To => Retail
2022-10-28 14:24meriem_azafTriggers an Emergency Pack => No
2022-10-28 14:24meriem_azafAssigned ToRetail => meriem_azaf
2022-10-28 14:24meriem_azafStatusnew => scheduled
2022-10-28 14:28meriem_azafDescription Updatedbug_revision_view_page.php?rev_id=25026#r25026
2022-10-28 14:56hgbotNote Added: 0142723
2022-10-28 15:00meriem_azafProjectRetail Modules => POS2
2022-11-07 12:58hgbotResolutionopen => fixed
2022-11-07 12:58hgbotStatusscheduled => closed
2022-11-07 12:58hgbotNote Added: 0143152
2022-11-07 12:58hgbotFixed in Version => 23Q1
2022-11-07 12:58hgbotNote Added: 0143153

Notes
(0142723)
hgbot   
2022-10-28 14:56   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1325 [^]
(0143152)
hgbot   
2022-11-07 12:58   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1325 [^]
(0143153)
hgbot   
2022-11-07 12:58   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: dcf1b2f01162786ccc219c23bad70a97141d4a6b
Author: Meriem Azaf <meriem.azaf@openbravo.com>
Date: 07-11-2022 12:55:51
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/dcf1b2f01162786ccc219c23bad70a97141d4a6b [^]

Fixes ISSUE-50681: Error when creating a category in Keymap window

Error when creating a category in Keymap window, it doesn't take into account the organization.

Because of that, it is not possible to define :

- Different default category for each restaurant.

- Configure the same name for different categories attached to different restaurants.

To fix this, we added a restriction related to the organization in hasOnlyOneDefaultCategory in OBPOS2KeymapCategoryEventHandler.java and also we added the organization id column to the unique constraint that is containing "OBPOS2_KEYMAP_VERSION_ID" and "NAME".

---
M src-db/database/model/tables/OBPOS2_KEYMAP_CATEGORY.xml
M src/org/openbravo/pos2/event/OBPOS2KeymapCategoryEventHandler.java
M web-jspack/org.openbravo.pos2/src/components/ProductCategoryKeymap/SetDefaultKeymapCategoryId.js
---