Openbravo Issue Tracking System - POS2
View Issue Details
0058092POS2POSpublic2025-02-27 10:322025-03-07 14:57
malsasua 
cberner 
highmajoralways
closedfixed 
5
 
 
No
0058092: updating to 24Q4, the invariants stock option is disabled
Updating from 24Q2 to 24Q4, the invariants stock option is disabled in some products (see attachment1).

After update, the following query should not return results:
select count(1)
from m_product
where row_characteristic <> em_obdest_rcharacteristic
or column_characteristic <> em_obdest_ccharacteristic
or characteristicdimensionenabled <> em_obdest_enabled

During the update, the modulescript MigrateDetailedStockColumnsToCharacteristicDimensions was executed
in 24Q2
. login in POS2
. add one line
. click in the line -> Product Card -> Other Stock -> 3 points:
the Product Variant Stock option is enabled
update to 24Q4
. login in POS2
. add one line
. click in the line -> Product Card -> Other Stock -> 3 points:
the Product Variant Stock option is disabled

No tags attached.
depends on backport 005812425Q1.1 scheduled cberner POS2 updating to 24Q4, the invariants stock option is disabled 
depends on backport 005812524Q4.2 scheduled cberner POS2 updating to 24Q4, the invariants stock option is disabled 
caused by feature request 0055463 closed cberner Openbravo ERP A Back office purchase screen multi-dimensional grid view should be added 
Not all the children of this issue are yet resolved or closed.
png attachment1.png (31,603) 2025-02-27 10:32
https://issues.openbravo.com/file_download.php?file_id=20978&type=bug
png
Issue History
2025-02-27 10:32malsasuaNew Issue
2025-02-27 10:32malsasuaAssigned To => Retail
2025-02-27 10:32malsasuaFile Added: attachment1.png
2025-02-27 10:32malsasuaTriggers an Emergency Pack => No
2025-02-27 11:40guillermogilAssigned ToRetail => Triage Omni OMS
2025-02-27 19:07aferrazRelationship addedcaused by 0055463
2025-02-27 19:11aferrazAssigned ToTriage Omni OMS => Triage Platform Base
2025-02-28 09:17cbernerAssigned ToTriage Platform Base => cberner
2025-03-03 12:34cbernerStatusnew => scheduled
2025-03-03 14:23cbernerNote Added: 0176366
2025-03-03 14:23cbernerStatusscheduled => feedback
2025-03-06 10:10cbernerStatusfeedback => scheduled
2025-03-06 14:06hgbotNote Added: 0176530
2025-03-07 14:57hgbotResolutionopen => fixed
2025-03-07 14:57hgbotStatusscheduled => closed
2025-03-07 14:57hgbotNote Added: 0176560
2025-03-07 14:57hgbotNote Added: 0176561

Notes
(0176366)
cberner   
2025-03-03 14:23   
Checking the modulescript, it looks fine. The modulescript in charge of updating the columns row_characteristic, column_characteristic and characteristicdimensionenabled is executed on the proper versions.

It is executed on any version of the module prior to "1.0.242900", so, any version that is afterwards updated to 24Q3 or a newer version will execute the modulescript.

It is not at all clear what happened in this case, that it required to be run manually, it is not reproducible with our sampledatas(upgrading from 24Q2 to 24Q3).
(0176530)
hgbot   
2025-03-06 14:06   
Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.pos2.detailedstock/-/merge_requests/15 [^]
(0176560)
hgbot   
2025-03-07 14:57   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.pos2.detailedstock [^]
Changeset: 58b1ed467a56e4dcd757520a1d00688752cf5980
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 06-03-2025 14:04:00
URL: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.pos2.detailedstock/-/commit/58b1ed467a56e4dcd757520a1d00688752cf5980 [^]

Fixes ISSUE-58092: updating to 24Q4, the invariants stock option is disabled

The modulescript was failing to update from 24Q2 to 24Q4 in several
cases, it seems the problem comes from the column check of
characteristicdimensionenabled, when it is null, the where clause
returns false incorrectly.

characteristicdimensionenabled <> em_obdest_enabled -> returns false
when the former is NULL
NULL <> 'N'/'Y' -> Returns false

---
M build/classes/org/openbravo/pos2/detailedstock/modulescript/MigrateDetailedStockColumnsToCharacteristicDimensions.class
M src-util/modulescript/src/org/openbravo/pos2/detailedstock/modulescript/MigrateDetailedStockColumnsToCharacteristicDimensions.java
---
(0176561)
hgbot   
2025-03-07 14:57   
Merge request merged: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.pos2.detailedstock/-/merge_requests/15 [^]