Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011486Openbravo ERP00. Application dictionarypublic2009-11-25 11:572009-12-15 04:56
networkb 
harikrishnan 
highminoralways
closedfixed 
5
2.50MP9 
2.50MP102.50MP10 
Core
No
0011486: "Allow negative stock" does not chech if products have negative stock
If "Allow negative stock" is checked and then you deactivated it, no checking is done in order to verify if any product has a negative stock.
This causes a unstable information about stock.
1) Check that Entity in General setup > Client > Client > Information, Allow Negative Stock is active.
2) Navigate to Navigate to Warehouse Management || Analysis Tools || Stock Report and check if there is any product with negative stock.
3) If not, create and complete some Goods Shipments of a product to reach negative stock.
4) Navigate to Navigate to Warehouse Management || Analysis Tools || Stock Report and check if there is any product with negative stock.
5) Navigate back to Entity in General setup > Client > Client > Information and de-activate Allow Negative Stock.

No message is shown.
When saving this record (in AD_CLIENT_INFO table [1]), a trigger has to make a stock check for the current Client. If the stock check fails (there are products with negative stock for this client), record should not be saved and error message should display: There are products with negative stock. Please set their stock to zero before allowing negative stock.

Stock check has to follow the same query as https://code.openbravo.com/erp/devel/pi/file/e083d72207fd/src-db/database/model/functions/M_CHECK_STOCK.xml#l48 [^] but removing the product and organization (all the products have to be verified for all the organizations within the current client).

[1] https://code.openbravo.com/erp/devel/pi/file/fbbc19d048ad/src-db/database/model/tables/AD_CLIENTINFO.xml [^]
No tags attached.
related to defect 00111352.50MP10 closed rafaroda Insufficent stock in the line of produced product in Bill of Materials production window 
Issue History
2009-11-25 11:57networkbNew Issue
2009-11-25 11:57networkbAssigned To => rafaroda
2009-11-25 14:19rafarodaRelationship addedrelated to 0011135
2009-12-01 17:26rafarodaPriorityimmediate => high
2009-12-01 17:26rafarodaStatusnew => scheduled
2009-12-01 17:26rafarodaDescription Updated
2009-12-01 17:26rafarodaProposed Solution updated
2009-12-01 17:26rafarodaSteps to Reproduce Updated
2009-12-02 09:45harikrishnanAssigned Torafaroda => harikrishnan
2009-12-02 11:07rafarodaSteps to Reproduce Updated
2009-12-03 11:12hgbotCheckin
2009-12-03 11:12hgbotNote Added: 0022389
2009-12-03 11:12hgbotStatusscheduled => resolved
2009-12-03 11:12hgbotResolutionopen => fixed
2009-12-03 11:12hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d05f23c7afe6a343dc9fdc8f5e9743950259b868 [^]
2009-12-04 09:15hudsonbotCheckin
2009-12-04 09:15hudsonbotNote Added: 0022454
2009-12-08 09:12sureshbabuNote Added: 0022531
2009-12-08 09:12sureshbabuStatusresolved => new
2009-12-08 09:12sureshbabuResolutionfixed => open
2009-12-11 09:38hgbotCheckin
2009-12-11 09:38hgbotNote Added: 0022687
2009-12-11 09:38hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/d05f23c7afe6a343dc9fdc8f5e9743950259b868 [^] => http://code.openbravo.com/erp/devel/pi/rev/51f8743bf57c654e4cdb07ba3e92b11eec39aaf6 [^]
2009-12-11 09:46rafarodaStatusnew => scheduled
2009-12-11 09:46rafarodafix_in_branch => pi
2009-12-11 09:46rafarodaStatusscheduled => resolved
2009-12-11 09:46rafarodaResolutionopen => fixed
2009-12-14 10:55sureshbabuNote Added: 0022733
2009-12-14 10:55sureshbabuStatusresolved => closed
2009-12-14 10:55sureshbabuFixed in Version => 2.50MP10
2009-12-15 00:00anonymoussf_bug_id0 => 2914441
2009-12-15 04:56hudsonbotCheckin
2009-12-15 04:56hudsonbotNote Added: 0022784

Notes
(0022389)
hgbot   
2009-12-03 11:12   
Repository: erp/devel/pi
Changeset: d05f23c7afe6a343dc9fdc8f5e9743950259b868
Author: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
Date: Thu Dec 03 15:41:39 2009 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/d05f23c7afe6a343dc9fdc8f5e9743950259b868 [^]

Fixes Issue 11486: \"Allow negative stock\" does not check if products have negative stock.

---
M src-db/database/sourcedata/AD_MESSAGE.xml
A src-db/database/model/triggers/AD_CLIENTINFO_TRG.xml
---
(0022454)
hudsonbot   
2009-12-04 09:15   
---
A changeset related to this issue has passed a series of tests and has been promoted to main:

Changeset: http://code.openbravo.com/erp/devel/main/rev/f6bc559b1872 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
---
(0022531)
sureshbabu   
2009-12-08 09:12   
The message "There are products with negative stock. Please set their stock to zero before allowing negative stock" appears when the user un-checks the "Allow Negative Stock" check box, which is out of context.

 (When we un-check the Allow Negative stock check box, ERP would not allow the user to perform transactions related with negative stocking nothing but we are deactivates the option of performing transactions with negative stock)

Kindly change the message similar to below

"There are products already with negative stock. Please set their stock to zero before deactivating the negative stock option"
(0022687)
hgbot   
2009-12-11 09:38   
Repository: erp/devel/pi
Changeset: 51f8743bf57c654e4cdb07ba3e92b11eec39aaf6
Author: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
Date: Fri Dec 11 14:06:34 2009 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/51f8743bf57c654e4cdb07ba3e92b11eec39aaf6 [^]

Fix for issue 11486 changing the message.

---
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0022733)
sureshbabu   
2009-12-14 10:55   
Tested working fine
(0022784)
hudsonbot   
2009-12-15 04:56   
---
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/e7ad8a48210d [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/obx/core/OpenbravoERP-2.50CI.15705.obx [^]
---