Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0012859Openbravo ERP04. Warehouse managementpublic2010-04-01 21:302012-03-27 14:08
raguilar 
Sandrahuguet 
normalminoralways
closedduplicate 
20Community Appliance
2.50MP9 
 
Core
No
0012859: m_production_run function doesn't validate if product has isstocked value set to 'N' and send NoEnoughStocked error
In line 374 of m_production_run the line validates if product has inventory in order to the BOM Production can run. This is done for all product regardless of the isSotcked attibute value.

The orginal line in teh m_production_run is:

IF (v_QtyAcumulated < CUR_BOM.BOMQTY*CUR_BOM.ProductionQty) THEN

and should be:

 IF (v_QtyAcumulated < CUR_BOM.BOMQTY*CUR_BOM.ProductionQty) AND Cur_BOM.isSotcked = 'Y' THEN

To skip inventory validation for non stocked products
Asign a product the product type Service or Item and the attribute isStrocked to 'N' and the asign this to a BOM of another product with isStocked attribute set to 'Y', BOM set to 'Y' and Product Type to item.

Then run Bill of Materials Production menu option to produce the product with BOM and you'll get the error message:

Error:
Insufficient stock:: product xxx 0 / n
Change condition in line 374 of the m:production_run to

IF (v_QtyAcumulated < CUR_BOM.BOMQTY*CUR_BOM.ProductionQty) AND Cur_BOM.isSotcked = 'Y' THEN
VMA-Reviewed
duplicate of defect 0014298 closed Sandrahuguet BOM: option 'product quantity must be on stock' doesn't seem to affect the outcome when left blank 
? m_production_run.sql (25,738) 2010-04-01 21:30
https://issues.openbravo.com/file_download.php?file_id=2398&type=bug
Issue History
2010-04-01 21:30raguilarNew Issue
2010-04-01 21:30raguilarAssigned To => adrianromero
2010-04-01 21:30raguilarFile Added: m_production_run.sql
2010-04-01 21:31raguilarIssue Monitored: raguilar
2010-04-06 11:15adrianromeroNote Added: 0025890
2010-04-06 11:15adrianromeroPriorityimmediate => normal
2010-04-06 11:15adrianromeroSeveritycritical => minor
2011-06-03 10:59dalsasuaAssigned Toadrianromero => dalsasua
2011-07-20 18:12dalsasuaAssigned Todalsasua => jonalegriaesarte
2011-09-29 17:05gorkaionStatusnew => scheduled
2011-09-29 17:05gorkaionfix_in_branch => pi
2012-02-15 19:04iciordiaAssigned Tojonalegriaesarte => vmromanos
2012-02-16 16:31vmromanosTag Attached: VMA-Reviewed
2012-03-20 13:59SandrahuguetAssigned Tovmromanos => Sandrahuguet
2012-03-20 14:09SandrahuguetRelationship addedrelated to 0014298
2012-03-27 14:08vmromanosRelationship replacedduplicate of 0014298
2012-03-27 14:08vmromanosNote Added: 0046771
2012-03-27 14:08vmromanosStatusscheduled => closed
2012-03-27 14:08vmromanosResolutionopen => duplicate

Notes
(0025890)
adrianromero   
2010-04-06 11:15   
The severity and priority has been lowered according the Bug Reporting Guidelines:

http://wiki.openbravo.com/wiki/Bug_Reporting_Guidelines#How_to_Choose_the_Right_Severity [^]
(0046771)
vmromanos   
2012-03-27 14:08   
Fixed in 0014298