Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030754Openbravo ERP04. Warehouse managementpublic2015-09-03 16:112015-11-23 21:16
ngarcia 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
3.0PR16Q1 
vmromanos
Core
No
0030754: Stock of inactive products can be increased
Stock of inactive products can be increased through the following documents:
   Goods Receipt
   Physical Inventory
   Goods Shipment with negative quantity
   Work Effort
   Bill Of Material Production
As group admin role:
   Create a product
   Create a goods receipt with it. Do not complete it
   Set the product as inactive
   Check you can complete the goods receipt and you have stock of the product
   Set the product as active
   Check you cannot set the product as inactive because it has stock
   The process can be repeated which every document that increases the stock
No tags attached.
related to defect 0030697 closed AtulOpenbravo Create Inventory Count List inserts inactive products 
Issue History
2015-09-03 16:11ngarciaNew Issue
2015-09-03 16:11ngarciaAssigned To => Triage Finance
2015-09-03 16:11ngarciaModules => Core
2015-09-03 16:11ngarciaResolution time => 1444168800
2015-09-03 16:11ngarciaTriggers an Emergency Pack => No
2015-09-03 16:11ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=9339#r9339
2015-09-03 16:40ngarciaRelationship addedrelated to 0030697
2015-09-03 16:40ngarciaIssue Monitored: networkb
2015-09-23 11:55AtulOpenbravoAssigned ToTriage Finance => AtulOpenbravo
2015-09-23 11:55AtulOpenbravoStatusnew => scheduled
2015-09-28 19:31AtulOpenbravoNote Added: 0080676
2015-09-29 11:53psanjuanNote Edited: 0080676bug_revision_view_page.php?bugnote_id=0080676#r9503
2015-09-29 12:00psanjuanNote Edited: 0080676bug_revision_view_page.php?bugnote_id=0080676#r9504
2015-09-30 13:02psanjuanNote Edited: 0080676bug_revision_view_page.php?bugnote_id=0080676#r9538
2015-09-30 13:09psanjuanNote Edited: 0080676bug_revision_view_page.php?bugnote_id=0080676#r9539
2015-09-30 13:10psanjuanNote Added: 0080744
2015-09-30 13:10psanjuanNote Edited: 0080744bug_revision_view_page.php?bugnote_id=0080744#r9541
2015-10-01 09:49psanjuanNote Added: 0080771
2015-10-01 10:08psanjuanNote Edited: 0080676bug_revision_view_page.php?bugnote_id=0080676#r9547
2015-10-01 11:11psanjuanNote Edited: 0080676bug_revision_view_page.php?bugnote_id=0080676#r9551
2015-10-01 11:17psanjuanNote Edited: 0080676bug_revision_view_page.php?bugnote_id=0080676#r9552
2015-10-01 12:30psanjuanNote Edited: 0080676bug_revision_view_page.php?bugnote_id=0080676#r9558
2015-10-01 18:20vmromanosTarget Version => 3.0PR16Q1
2015-10-01 18:23hgbotCheckin
2015-10-01 18:23hgbotNote Added: 0080793
2015-10-01 18:23hgbotStatusscheduled => resolved
2015-10-01 18:23hgbotResolutionopen => fixed
2015-10-01 18:23hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c10451d08a850fc28def1503464757a2c3eabc8f [^]
2015-10-01 18:24vmromanosReview Assigned To => vmromanos
2015-10-01 18:24vmromanosNote Added: 0080794
2015-10-01 18:24vmromanosStatusresolved => closed
2015-11-23 21:16hudsonbotCheckin
2015-11-23 21:16hudsonbotNote Added: 0082105

Notes
(0080676)
AtulOpenbravo   
2015-09-28 19:31   
(edited on: 2015-10-01 12:30)
Test Plan

A.

- Login as Group Admin role.
- Create a product.
- Create a goods receipt with it. Do not complete it
- Set the product as inactive.
- Process the Goods Receipt.
- Check that error is displayed. In line 10, Product used in transaction is inactive.

B.

- Login as Group Admin role.
- Create a product.
- Create a goods shipment with product created. Enter a movemenqty quantity as negative value.
- Create one more line with same product and negative movementqty.
- Set the product as inactive.
- Process the Goods Shipment.
- Check that error is displayed. In line 10, 20, Product used in transaction is inactive.
- In the same Goods Shipment, try to select the product set as Active = No. Realize that is not possible. That is correct.
- Navigate to Product window and set it as Active = Yes once more.
- Go to the goods shipment, create a new line and select the product. Enter this time a positive Movement quantity.
- Create another line and select any other product.
- Go back to product window and set this product as Active = No.
- Go to Goods Shipment and try to complete it.
- Realize that below error is shown once more: In line 10, 20, 30 Product used in transaction is inactive. That is correct, therefore Goods Shipment cannot be processed.

Note : I would change the error message as
"In line 10, 20, 30 the product used is not active.

C.

- Login as Group Admin role.
- Create a product set as "Bill of Materials", i.e. Box
- Create two more product to be part of Bill of Materials product ie. component A, component B.
- Go to Bill of Materials product and enter two components of the BOM in the Bill of Materials tab, together with the BOM Quantity.
- Validate Bill of Materials
- Go to Bill of Materials Production window create a new header.
- Go to production plan tab and select the product configured as Bill of Materials, ie: Box
- Enter a production quantity and a storage bin.
- Create bill of materials and verify that the components are shown in the sub-tab I/O Products.
- Go to product window and set one of the BOM components as Active = No
- Go back to Bill of Materials production and process it
- An error is shown saying: production run line nº 10, Product Line Nº XX, Product used in transaction is inactive.

D.

Configuration steps:

The organization to be used is F&B España, for instance, so all master data below can be created for F&B España organization.

-Go to Planning Method window and create below Planning Method.
Planning Method Test.
-Select all transactions type in lines 10..50 (Material Requirement, Sales Forecast, Pending Purchase Order, Pending Sales Order and Pending Work Requirement). Weighting = 1 for each line.
-Do not enter any Days from/to, to make it simple.

-Go to Planner and create "Planner 1".

-Go to Product window and create below 3 products:

(1) Search Key = Name = 02317077-REV-X1. Set as "Purchase" = Yes, "Sale" = NO, "Production" = Yes
Go to price tab and select "Tarifa Bebidas Alegres" - Unit Price = List Price = 100.00
Go to Manufacturing tab and enter below data: "Planning Method Test", and "Planner 1".

(2) Search Key = Name = 02317079-REV-X1. Set as "Purchase" = No, "Sale" = Yes, "Production" = Yes.
Go to Manufacturing tab and enter below data: "Planning Method Test" and "Planner 1". Select a Storage bin.
Go to price tab and select a "Sales" price list- Unit Price = List Price = 150.00

(3) Search Key = Name = 02317077-REV-X2. Set as "Purchase" = Yes, "Sale"= No, "Production" = Yes
Tarifa Bebidas Alegres - Unit Price = List Price = 90.00
Go to Manufacturing tab and enter below data: "Planning Method Test" and "Planner 1".
- Go to "Activity" window and create an activity/operation named "Build". Save.

- Go to "Process Plan" window and create a new one named "WP201-REV"
- Go to "Version" tab and create two versions one starting from/to 01-01-2015/30-10-2015; and the other one starting from/to 01-11-2015/31-12-2015
- Select version 1 and enter operation Build. Go to I/O Products and enter below P+, P-:
Product = 02317079-REV-X1 - as P+, Quantity = 1
Product = 02317077-REV-X1 - as P-, Quantity= 1
- Select verion 2 and enter operation Build. Go to I/O Products and enter below P+, P-:
Product = 02317079-REV-X1 - as P+, Quantity = 1
Product = 02317077-REV-X2 - as P-, Quantity= 1

- Go to Product window and enter above created "Process Plan" "WP201-REV" for each of these three products.

- Create a goods receipt for product 02317077-REV-X1 for 15 units dated on 01-01-2015. Complete it.

- Go to "MRP Forecast" window and create a new one with below setup: Document Date 29-09-2015,BP = Alimentos y Supermercados.
- Go to lines tab and enter below data:
Planned date = 01-10-2015
Product = 02317079-REV-X1

- Go to Manufacturing Plan window create a new one dated on 29-09-2015. Time Horizon = 30 days. Process Manufacturing Plan.

- Generate Work Requirements. Navigate to Work Requirement window. Process it and Create Work Effort.

- Go to Work Effort window, enter an employee, go to "Production Run" tab and enter a completed quantity = 5 for instance and click on "Create Standards".

- Go to product window and set product 02317077-REV-X1 as Active = No.

- Validate work effort. An error message saying that the product is inactive will then be shown.

(0080744)
psanjuan   
2015-09-30 13:10   
New issue opened, see issue related

- Login as Group Admin role.
- Create a product related to a purchase price list.
- Create a purchase order with the product created.
- Do not book it.
- Set the product as inactive.
- Book the order.
- Check that it is said as "Process completed Successfully"

Openbravo should not allow to process/book an order for a product that it is not Active anymore.

(0080771)
psanjuan   
2015-10-01 09:49   
Test Plan above verified.
Issue can be closed.
(0080793)
hgbot   
2015-10-01 18:23   
Repository: erp/devel/pi
Changeset: c10451d08a850fc28def1503464757a2c3eabc8f
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon Sep 28 19:19:54 2015 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/c10451d08a850fc28def1503464757a2c3eabc8f [^]

Fixes Issue 30754:Stock of inactive products can be increased.

Before processing Goods Receipt, Goods Shipment with -ve lines, BOM Production
and Work effort transaction line product active flag is checked.

---
M src-db/database/model/functions/MA_WORKEFFORT_VALIDATE.xml
M src-db/database/model/functions/M_INOUT_POST.xml
M src-db/database/model/functions/M_PRODUCTION_RUN.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0080794)
vmromanos   
2015-10-01 18:24   
Code review OK

Note: ideally we should remove the last ',' just after the line no.
(0082105)
hudsonbot   
2015-11-23 21:16   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/7b56bebaaa88 [^]
Maturity status: Test