Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033080Retail ModulesWeb POSpublic2016-05-30 15:312016-06-14 13:19
umartirena 
ranjith_qualiantech_com 
highminorsometimes
closedfixed 
5
 
RR16Q3 
guilleaer
No
0033080: [SERQA 1192] WEB: Products of type "Service" can be configured as "Show stock screen" when they shouldn't
Products of type "Service" can be configured as "Show stock screen" when they shouldn't as it doesn't make sense. It has no sense to display stock screen in Web POS for Service products has they are not stockable.
In Openbravo ERP (Live Builds):
 * Go to Product Window.
 * Filter by a "Sports Accident Insurance" product.
 * Edit the product and set the flag "Show stock screen".

In Web POS:
 * Add the service to the ticket.
Stock screen is displayed. This is not necessary as the services don't have stock in the warehouse.
Don't allow in the backend to check "Show stock screen" flag for Services.
SER-QA
patch issue 33080 posterminal 6482.patch (5,755) 2016-06-07 10:05
https://issues.openbravo.com/file_download.php?file_id=9498&type=bug
Issue History
2016-05-30 15:31umartirenaNew Issue
2016-05-30 15:31umartirenaAssigned To => Retail
2016-05-30 15:31umartirenaTriggers an Emergency Pack => No
2016-05-30 15:34umartirenaResolution time => 1466114400
2016-05-30 15:34umartirenaSummaryProducts of type "Service" can be configured as "Show stock screen" when they shouldn't as it doesn't make sense => [SERQA 1192] WEB: Products of type "Service" can be configured as "Show stock screen" when they shouldn't
2016-05-31 10:37OrekariaNote Added: 0086852
2016-05-31 10:37OrekariaAssigned ToRetail => umartirena
2016-05-31 10:37OrekariaStatusnew => feedback
2016-05-31 10:52umartirenaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12262#r12262
2016-06-01 09:16umartirenaStatusfeedback => new
2016-06-01 09:21umartirenaTag Attached: SER-QA
2016-06-01 09:21umartirenaAssigned Toumartirena => Orekaria
2016-06-01 13:05OrekariaStatusnew => acknowledged
2016-06-02 09:02ranjith_qualiantech_comAssigned ToOrekaria => ranjith_qualiantech_com
2016-06-02 09:02ranjith_qualiantech_comStatusacknowledged => scheduled
2016-06-06 07:37hgbotCheckin
2016-06-06 07:37hgbotNote Added: 0087005
2016-06-06 07:37hgbotStatusscheduled => resolved
2016-06-06 07:37hgbotResolutionopen => fixed
2016-06-06 07:37hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/83044ae86f27f3a565a2d99e38d65a89ef625263 [^]
2016-06-06 11:10marvintmNote Added: 0087021
2016-06-06 11:10marvintmStatusresolved => new
2016-06-06 11:10marvintmResolutionfixed => open
2016-06-06 11:10marvintmStatusnew => scheduled
2016-06-07 10:05ranjith_qualiantech_comFile Added: issue 33080 posterminal 6482.patch
2016-06-08 07:05hgbotCheckin
2016-06-08 07:05hgbotNote Added: 0087080
2016-06-09 12:33marvintmNote Added: 0087113
2016-06-10 14:50marvintmNote Added: 0087166
2016-06-14 09:40hgbotCheckin
2016-06-14 09:40hgbotNote Added: 0087228
2016-06-14 09:40hgbotStatusscheduled => resolved
2016-06-14 09:40hgbotResolutionopen => fixed
2016-06-14 09:40hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/83044ae86f27f3a565a2d99e38d65a89ef625263 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/467bc231c315616588cbccd188753bf5cb9984dc [^]
2016-06-14 13:19guilleaerReview Assigned To => guilleaer
2016-06-14 13:19guilleaerStatusresolved => closed
2016-06-14 13:19guilleaerFixed in Version => RR16Q3

Notes
(0086852)
Orekaria   
2016-05-31 10:37   
Please better steps to reproduce
(0087005)
hgbot   
2016-06-06 07:37   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 83044ae86f27f3a565a2d99e38d65a89ef625263
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Jun 06 11:06:33 2016 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/83044ae86f27f3a565a2d99e38d65a89ef625263 [^]

Fixes issue 33080 : Adding Product Event handler

- Not allow to enable the field "show stock screen" if the product type is "Service"

---
M src-db/database/sourcedata/AD_MESSAGE.xml
A src/org/openbravo/retail/posterminal/event/ProductEventHandler.java
---
(0087021)
marvintm   
2016-06-06 11:10   
This same check could be done via a Check constraint, and we would allow both the performance overhead of having an EventHandler and also we wouldn't need to maintain a new class.
(0087080)
hgbot   
2016-06-08 07:05   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 28bf034b6ddd2bf886da6ffd580f8343a0da246a
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Jun 07 13:12:39 2016 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/28bf034b6ddd2bf886da6ffd580f8343a0da246a [^]

Related to issue 33080 : Adding Check constraint for Product

- Adding Check Constraint in Product table for Not to allow to enable the field "show stock screen" if the product type is "Service"
- backout changset 83044ae86f27

---
M src-db/database/model/modifiedTables/M_PRODUCT.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
R src/org/openbravo/retail/posterminal/event/ProductEventHandler.java
---
(0087113)
marvintm   
2016-06-09 12:33   
Some small changes are still required:
- The check constraint can be simplified a bit. Instead of:
PRODUCTTYPE <> 'S' AND EM_OBPOS_SHOWSTOCK IS NOT NULL OR PRODUCTTYPE = 'S' AND EM_OBPOS_SHOWSTOCK = 'N'
It could just be formulated like this:
PRODUCTTYPE <> 'S' OR EM_OBPOS_SHOWSTOCK = 'N'

- The AD_Message should be preserved, but it's search key should be equal to the constraint name. In this way when the constraint fails, the user will get a readable error.
(0087166)
marvintm   
2016-06-10 14:50   
After some further discussion, we have realized that adding the constraint is an API change, and that there could be people already having services marked as "showstock". As of now the only consequence this has is that the window will appear when they try to add services to the ticket.

On the other hand if we keep the constraint the update.database will fail automatically in this case. So we now believe that it's actually better to solve this issue via the EventHandler, and remove the constraint.
(0087228)
hgbot   
2016-06-14 09:40   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 467bc231c315616588cbccd188753bf5cb9984dc
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Jun 13 11:21:46 2016 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/467bc231c315616588cbccd188753bf5cb9984dc [^]

Fixes issue 33080 : Reverting the changes

Backed out changeset: 28bf034b6ddd

---
M src-db/database/model/modifiedTables/M_PRODUCT.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
A src/org/openbravo/retail/posterminal/event/ProductEventHandler.java
---