Openbravo Issue Tracking System - Retail Modules
View Issue Details
0049274Retail ModulesWeb POSpublic2022-05-09 21:422022-06-22 12:25
idiez 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
RR21Q3.2 
RR22Q3 
No
0049274: Sales with attributes
The client is in version: 3.0 PR21Q3.2
We have configured a set of attributes, with a non-instantiable attribute. That according to what was commented on its day, it serves to not generate a new identifier each time.
We simply have this attribute to save the year of purchase of the part.

We have the problem in sales from the POS when there is no stock of that product/attribute. When a product is sold without stock of that attribute, Openbravo generates a new identifier.
The same situation has been tested from the backoffice generating a sale and purchase, and it does so correctly. That is, it does not generate a new identifier even if it does not have stock.
1) We create a product with attributes

2) We go to the "goods Shipment" window and create a Delivery Note and complete the line with the product created,
In the attribute value we put "9" and quantity moved "5", we complete

3) We verify that the movement in the stock has been created in the product

4) We make a sale in the "Goods Receipt" window, we complete and add the line and we complete in the "Attribute value" tab with "22" and quantity moved "2" and we complete

5) We make a sale again with an attribute that we do not have, in the "Attribute value" tab we add "21" and in amount moved "1", we complete the sale

6) It can be seen that the correct product has a negative stock

7) We go to the webpos and make a sale with the product we have created and select the attribute "22" and pay it

8) We return to the back office and check that it has correctly subtracted the stock from attribute 22

9) We make a sale on the same product with a non-existent attribute, we pay

10) We return to the backoffice we will see that attribute 20 is in negative stock

11) It is expected that there are no transactions with duplicate attributes but different internal ids, which is why there are duplications



The video with steps:

https://docs.google.com/document/d/15aKM_Un8aihJDupIpsOiUY3AvdpOVU5XxpfOBsEl_bg/edit?usp=sharing [^]


To Produce the issue in Livebuilds
Backoffice
Enable Pref: "Enable Web POS Enable support for product attributes"
Create Mandatory Attribute
Create Attribute Set and associate the above attribute
Create 2 products and associate Attribute Set (Add Product Price and Product in Assortment)
Create Physical Inventory for 1st Product with attribute Value 'X' and Process
POS
Add 2nd product with same attribute Value 'X' and complete it.

Currently, its creating the new attributeSetInstance. - KO
It should use the existing attributeSetInstance (which was created for 1st Product) - OK
No tags attached.
diff 49274_21Q3_posterminal.diff (4,360) 2022-06-22 12:25
https://issues.openbravo.com/file_download.php?file_id=17209&type=bug
Issue History
2022-05-09 21:42idiezNew Issue
2022-05-09 21:42idiezAssigned To => Retail
2022-05-09 21:42idiezTriggers an Emergency Pack => No
2022-05-09 21:45PracticsIssue Monitored: Practics
2022-05-25 14:10ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2022-05-25 14:32ranjith_qualiantech_comStatusnew => scheduled
2022-05-31 08:26hgbotNote Added: 0137862
2022-06-17 07:34ranjith_qualiantech_comSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=24303#r24303
2022-06-20 07:13hgbotResolutionopen => fixed
2022-06-20 07:13hgbotStatusscheduled => closed
2022-06-20 07:13hgbotNote Added: 0138541
2022-06-20 07:13hgbotFixed in Version => RR22Q3
2022-06-20 07:13hgbotNote Added: 0138542
2022-06-22 12:25ranjith_qualiantech_comFile Added: 49274_21Q3_posterminal.diff

Notes
(0137862)
hgbot   
2022-05-31 08:26   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/813 [^]
(0138541)
hgbot   
2022-06-20 07:13   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/813 [^]
(0138542)
hgbot   
2022-06-20 07:13   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: be07e3440cf1ca9639237cce180aa99ecd7ddc86
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 20-06-2022 05:08:47
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/be07e3440cf1ca9639237cce180aa99ecd7ddc86 [^]

Fixed ISSUE-49274: AttributeSetInstance should be saved when creating order
* AttributeSetInstance should be checked in AttributeSet table instead of Product.
* If AttributeSetInstance doesn't exist, save AttributeSetInstance
  before saving order line (or) shipment line

---
M src/org/openbravo/retail/posterminal/utility/AttributesUtils.java
---