Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034089Retail ModulesWeb POSpublic2016-09-26 14:092016-10-21 08:55
nataliag 
mario_castello 
normalmajoralways
closedfixed 
5
 
RR17Q1 
guilleaer
No
0034089: [Stock validation] Stock Validation not working creating a sales order from a quotation
When you create a sales order from a quotation in which you have buy more products than stock of that product, a pop up appears advising you that there is not enough stock. But when you accept it, you can continue with the sales order and buy more products than stock available. "Allow negative Stock" option is unselected in the client configuration.
1- Go to webpos and select "Create Quotation" in the menu.
2- Select a product quantity greater than its stock.
3- Select "Create Sales order" option in the menu.
4- In the pop up select "Firm Quotation" option and "Create Sales order".
5- Another pop up appears advising you that there is not enough stock, select "ok".
6- Now you can continue with the sales order and pay it as if there has stock. So you can buy more products than stock available.
No tags attached.
has duplicate defect 0028210 closed jorge-garcia We are able to create an order from Quotations when we have more than line with products without stock. We shouldn't be able. 
related to defect 0034092 closed nataliag [Stock validation] Stock Validation not working using several receipts at the same time 
patch issue0034089.patch (4,424) 2016-10-03 22:38
https://issues.openbravo.com/file_download.php?file_id=9885&type=bug
patch test34089.patch (10,103) 2016-10-05 16:51
https://issues.openbravo.com/file_download.php?file_id=9898&type=bug
Issue History
2016-09-26 14:09nataliagNew Issue
2016-09-26 14:09nataliagAssigned To => Retail
2016-09-26 14:09nataliagResolution time => 1476655200
2016-09-26 14:09nataliagTriggers an Emergency Pack => No
2016-09-26 15:34malsasuaDescription Updatedbug_revision_view_page.php?rev_id=13215#r13215
2016-09-26 16:21nataliagRelationship addedrelated to 0034092
2016-09-26 16:30nataliagPriorityurgent => normal
2016-10-03 16:34mario_castelloAssigned ToRetail => mario_castello
2016-10-03 17:19mario_castelloStatusnew => acknowledged
2016-10-03 22:36mario_castelloStatusacknowledged => scheduled
2016-10-03 22:38mario_castelloFile Added: issue0034089.patch
2016-10-05 16:51mario_castelloFile Added: test34089.patch
2016-10-05 16:54mario_castelloNote Added: 0090497
2016-10-15 17:49hgbotCheckin
2016-10-15 17:49hgbotNote Added: 0090593
2016-10-15 17:49hgbotStatusscheduled => resolved
2016-10-15 17:49hgbotResolutionopen => fixed
2016-10-15 17:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.stockvalidation/rev/8d9078777883419d9ab14d882bb0c2e0ae326f61 [^]
2016-10-15 17:50hgbotCheckin
2016-10-15 17:50hgbotNote Added: 0090594
2016-10-15 17:52mario_castelloNote Edited: 0090593bug_revision_view_page.php?bugnote_id=0090593#r13377
2016-10-15 17:54mario_castelloNote Edited: 0090593bug_revision_view_page.php?bugnote_id=0090593#r13378
2016-10-15 17:56mario_castelloNote Edited: 0090593bug_revision_view_page.php?bugnote_id=0090593#r13379
2016-10-15 18:00hgbotCheckin
2016-10-15 18:00hgbotNote Added: 0090595
2016-10-19 15:35guilleaerNote Added: 0090695
2016-10-19 15:36guilleaerNote Edited: 0090695bug_revision_view_page.php?bugnote_id=0090695#r13415
2016-10-19 18:31hgbotCheckin
2016-10-19 18:31hgbotNote Added: 0090703
2016-10-20 20:37hgbotCheckin
2016-10-20 20:37hgbotNote Added: 0090739
2016-10-21 08:55guilleaerReview Assigned To => guilleaer
2016-10-21 08:55guilleaerStatusresolved => closed
2016-10-21 08:55guilleaerFixed in Version => RR17Q1
2017-01-13 13:29marvintmRelationship addedhas duplicate 0028210

Notes
(0090497)
mario_castello   
2016-10-05 16:54   
Attached solution and test
(0090593)
hgbot   
2016-10-15 17:49   
(edited on: 2016-10-15 17:56)
Repository: erp/pmods/org.openbravo.retail.stockvalidation
Changeset: 8d9078777883419d9ab14d882bb0c2e0ae326f61
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Mon Oct 03 14:26:30 2016 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.stockvalidation/rev/8d9078777883419d9ab14d882bb0c2e0ae326f61 [^]

Fixed issue 34089: [Stock validation] Stock Validation not working creating a sales order from a quotation.

- Fixed SQL Injection in OrderFromQuotationStockChecker class.
- Replace condition to prevent wrong result in OrderFromQuotationStockChecker class.
- Moved the event to right place.

---
M src/org/openbravo/retail/stockvalidation/OrderFromQuotationStockChecker.java
M web/org.openbravo.retail.stockvalidation/js/modals.js
---

(0090594)
hgbot   
2016-10-15 17:50   
Repository: erp/pmods/org.openbravo.retail.stockvalidation
Changeset: 0593150db038d5bb47c365ff91ea428cb16cc255
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Tue Oct 04 13:02:38 2016 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.stockvalidation/rev/0593150db038d5bb47c365ff91ea428cb16cc255 [^]

Related to issue 34089: Added counter to prevent js error when the receipt have many lines and has been removed one line of the list

---
M web/org.openbravo.retail.stockvalidation/js/modals.js
---
(0090595)
hgbot   
2016-10-15 18:00   
Repository: tools/automation/pi-mobile
Changeset: 5b2b1f4272db9432161fa2996af2510372b90d6d
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Sat Oct 15 10:00:33 2016 -0600
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/5b2b1f4272db9432161fa2996af2510372b90d6d [^]

Related to issue 34089: Added automated tests

---
A src-test/org/openbravo/test/mobile/quarantine/extmodules/MCA/stockvalidation/I34089_OrderFromQuotationAllowNegativeStock.java
A src-test/org/openbravo/test/mobile/quarantine/extmodules/MCA/stockvalidation/I34089_OrderFromQuotationNotAllowNegativeStock.java
---
(0090695)
guilleaer   
2016-10-19 15:35   
(edited on: 2016-10-19 15:36)
Fix is tested & reviewed and it is OK but tests are not working properly:

I34089_OrderFromQuotationAllowNegativeStock java.lang.AssertionError(The expected value for 'listOrderLines_row1_quantity (testId = listOrderLines_row1_quantity)' does not match the existing value.

I34089_OrderFromQuotationNotAllowNegativeStock java.lang.AssertionError(The expected value for 'theButton_btnTotalToPay (testId = theButton_btnTotalToPay)' does not match the existing value.

(0090703)
hgbot   
2016-10-19 18:31   
Repository: tools/automation/pi-mobile
Changeset: b410fcc45274df611de98abd80650b7989ad3d1f
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Wed Oct 19 10:30:40 2016 -0600
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/b410fcc45274df611de98abd80650b7989ad3d1f [^]

Verifies issue 34089: Fixed test I34089_OrderFromQuotationAllowNegativeStock and I34089_OrderFromQuotationNotAllowNegativeStock

---
M src-test/org/openbravo/test/mobile/quarantine/extmodules/MCA/stockvalidation/I34089_OrderFromQuotationAllowNegativeStock.java
M src-test/org/openbravo/test/mobile/quarantine/extmodules/MCA/stockvalidation/I34089_OrderFromQuotationNotAllowNegativeStock.java
---
(0090739)
hgbot   
2016-10-20 20:37   
Repository: tools/automation/pi-mobile
Changeset: 4995da2ca201aeca09c93b5cbf79ff40bd9593a9
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Thu Oct 20 12:36:52 2016 -0600
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/4995da2ca201aeca09c93b5cbf79ff40bd9593a9 [^]

Verifies issue 34089: Select quantity from database to prevent errors in the tests

---
M src-test/org/openbravo/test/mobile/quarantine/extmodules/MCA/stockvalidation/I34089_OrderFromQuotationAllowNegativeStock.java
M src-test/org/openbravo/test/mobile/quarantine/extmodules/MCA/stockvalidation/I34089_OrderFromQuotationNotAllowNegativeStock.java
---