Openbravo Issue Tracking System - Retail Modules
View Issue Details
0048098Retail ModulesWeb POSpublic2021-11-17 20:262022-01-03 09:47
dromero 
ranjith_qualiantech_com 
highcriticalalways
closedfixed 
5
 
 
No
0048098: Error when importing orders from tpv with attributes
Is reproduced in livebuilds:

https://livebuilds.openbravo.com/retail_mp_3.0RR21Q4.1/web/org.openbravo.retail.posterminal/?terminal=VBS-1#login [^]

I forgot to comment in the video that it happens with products without stock of the attribute entered and that you have to activate the preference Web POS Enable support for product attributes.
Video explaining how to reproduce the error:

https://watch.screencastify.com/v/KpdUH8F5GbGDMk5dzbMF [^]

1.- Check the preference "Web POS Enable support for product attributes" where the field "Value" has to be "Y"
2.- Create an "Attribute Set" with the configuration shown in the video and with an "Attribute" that is of type "Instance Attribute" and has the "Mandatory" checkbox checked.
3.- Go to a product that has not been in stock before and uncheck the "Grouped Product" checkbox.
4.- Go to the Web POS, add the product twice and assign it an attribute
5.- Complete the ticket with above product.
Order is not saved in backoffice.
Eror Occured
org.openbravo.base.exception.OBException: Error in OrderLoader: Error when creating the shipment:
Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "m_storage_detail" violates foreign key constraint "m_storage_detail_m_attributese"
  Detail: Key (m_attributesetinstance_id)=(D2FD04C1E75C47E4947CD020A2630087) is not present in table "m_attributesetinstance".
No tags attached.
Issue History
2021-11-17 20:26dromeroNew Issue
2021-11-17 20:26dromeroAssigned To => Retail
2021-11-17 20:26dromeroRegression date => 2021-12-01
2021-11-17 20:26dromeroTriggers an Emergency Pack => No
2021-11-17 20:34PracticsIssue Monitored: Practics
2021-11-25 21:05dromeroNote Added: 0133375
2021-12-01 16:46egoitzRegression date2021-12-01 =>
2021-12-04 06:49ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2021-12-06 16:25ivazquezNote Added: 0133505
2021-12-07 12:09ranjith_qualiantech_comStatusnew => scheduled
2021-12-07 12:37ranjith_qualiantech_comSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=23387#r23387
2021-12-09 08:50hgbotNote Added: 0133536
2021-12-09 11:55hgbotResolutionopen => fixed
2021-12-09 11:55hgbotStatusscheduled => closed
2021-12-09 11:55hgbotFixed in Version => RR22Q1
2021-12-09 11:55hgbotNote Added: 0133557
2021-12-09 11:55hgbotNote Added: 0133558
2021-12-24 08:26swathi_kamalNote Added: 0133936
2021-12-24 08:26swathi_kamalStatusclosed => new
2021-12-24 08:26swathi_kamalResolutionfixed => open
2021-12-24 08:26swathi_kamalFixed in VersionRR22Q1 =>
2022-01-02 07:14ranjith_qualiantech_comStatusnew => scheduled
2022-01-02 18:54hgbotNote Added: 0134089
2022-01-03 09:47hgbotResolutionopen => fixed
2022-01-03 09:47hgbotStatusscheduled => closed
2022-01-03 09:47hgbotNote Added: 0134095
2022-01-03 09:47hgbotNote Added: 0134096

Notes
(0133375)
dromero   
2021-11-25 21:05   
Hello,

Any update?
(0133505)
ivazquez   
2021-12-06 16:25   
Hello Team,

Will you have any news?

Regards,
Ignacio Vazquez
(0133536)
hgbot   
2021-12-09 08:50   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/652 [^]
(0133557)
hgbot   
2021-12-09 11:55   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 0e5246cc08e6dc8bd6c1aec7c8f21b4062af9b29
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-12-09T10:54:43+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/0e5246cc08e6dc8bd6c1aec7c8f21b4062af9b29 [^]

Fixed ISSUE-48098: OrderLine AttributeSet should be used to create Shipment lines

---
M src/org/openbravo/retail/posterminal/utility/ShipmentUtils.java
---
(0133558)
hgbot   
2021-12-09 11:55   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/652 [^]
(0133936)
swathi_kamal   
2021-12-24 08:26   
The error continues to reproduce, the case that it did not recreate the attributetesetinstance and that it would use the one from the order line has been solved.

But the problem that there is is if there has never been stock of that attribute with which the attributesetinstance does not exist and when the order is processed it gives the same error again.
Solved it by adding a flush after creating the attribute.
(0134089)
hgbot   
2022-01-02 18:54   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.oms.retail/-/merge_requests/5 [^]
(0134095)
hgbot   
2022-01-03 09:47   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.oms.retail [^]
Changeset: b47cdf586f22a370fa9883c1be7a31f161d0aaeb
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 02-01-2022 11:44:01
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.oms.retail/-/commit/b47cdf586f22a370fa9883c1be7a31f161d0aaeb [^]

Fixed ISSUE-48098: Data should be saved for every stock transaction
* If Product with different attribute value,
  Stock transaction should be saved for every record

---
M src/org/openbravo/oms/retail/hook/StockByWarehouseHook.java
---
(0134096)
hgbot   
2022-01-03 09:47   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.oms.retail/-/merge_requests/5 [^]