Openbravo Issue Tracking System - POS2
View Issue Details
0051940POS2POSpublic2023-03-22 08:582023-03-23 08:27
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
23Q2 
No
0051940: Wrong query in ProductScanProductInfo component
The ProductScanProductInfo does a query for retrieving master data information of a product. This query is using a incorrect property on its where clause.
1) Login in the pos2
2) Go the orders window and select and order to open it
3) After the fix of 0051849 now the query fails. Before that fix, the query seemed to work but it was incorrectly defined.
Replace the current criteria:

      const productCriteria = new OB.App.Class.Criteria()
        .criterion('m_product_id', productId)
        .limit(1)
        .build();

with:

      const productCriteria = new OB.App.Class.Criteria()
        .criterion('id', productId)
        .limit(1)
        .build();

because the "m_product_id" property does not exists in the Product model, "id" must be used instead.
No tags attached.
related to defect 0051849 closed caristu Retail Modules Check for missing master data model index is wrong 
Issue History
2023-03-22 08:58caristuNew Issue
2023-03-22 08:58caristuAssigned To => Retail
2023-03-22 08:58caristuTriggers an Emergency Pack => No
2023-03-22 08:58caristuRelationship addedrelated to 0051849
2023-03-22 09:00caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=25736#r25736
2023-03-22 09:01caristuProposed Solution updated
2023-03-22 09:58hgbotNote Added: 0147823
2023-03-22 11:00caristuAssigned ToRetail => caristu
2023-03-22 14:04hgbotResolutionopen => fixed
2023-03-22 14:04hgbotNote Added: 0147842
2023-03-22 14:04hgbotStatusnew => closed
2023-03-22 14:05hgbotFixed in Version => 23Q2
2023-03-22 14:05hgbotNote Added: 0147843
2023-03-22 14:06caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=25741#r25741
2023-03-22 16:39hgbotNote Added: 0147846
2023-03-23 08:27hgbotNote Added: 0147870

Notes
(0147823)
hgbot   
2023-03-22 09:58   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1619 [^]
(0147842)
hgbot   
2023-03-22 14:04   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1619 [^]
(0147843)
hgbot   
2023-03-22 14:05   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 8707e4ba2749272e4787e35ea7c7f28a15aab78a
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 22-03-2023 13:04:29
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/8707e4ba2749272e4787e35ea7c7f28a15aab78a [^]

fixes BUG-51940: fix product query in ProductScanProductInfo component

---
M web-jspack/org.openbravo.pos2/src/components/ProductScan/ProductScanProductInfo/ProductScanProductInfo.jsx
---
(0147846)
hgbot   
2023-03-22 16:39   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 7cd1a02d5c00d471b2622630adc923daee85067b
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 22-03-2023 16:36:06
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/7cd1a02d5c00d471b2622630adc923daee85067b [^]

related to BUG-51940: can use withId method

---
M web-jspack/org.openbravo.pos2/src/components/ProductScan/ProductScanProductInfo/ProductScanProductInfo.jsx
---
(0147870)
hgbot   
2023-03-23 08:27   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 63fbc0df11cca3eb422a42307eb8ef54175dff90
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 23-03-2023 08:27:02
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/63fbc0df11cca3eb422a42307eb8ef54175dff90 [^]

related to BUG-51940: mock withId method

---
M web-jspack/org.openbravo.pos2/src/components/ProductScan/__test__/ProductScan.test.jsx
---