Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024991Openbravo ERP05. Production managementpublic2013-10-22 17:222015-06-04 14:27
VictorVillar 
aferraz 
urgentmajoralways
closedfixed 
5
pi 
 
dmiguelez
Core
No
0024991: Allow negative stock for BOM production is not implemented
Allow negative stock for BOM production is not implemented
Allow negative stock for BOM production is not implemented
No tags attached.
depends on design defect 0023701 new dmiguelez 'Allow negative stock' is not fully supported in Openbravo 
Not all the children of this issue are yet resolved or closed.
Issue History
2013-10-22 17:22VictorVillarNew Issue
2013-10-22 17:22VictorVillarAssigned To => dmiguelez
2013-10-22 17:22VictorVillarModules => Core
2013-10-22 17:22VictorVillarTriggers an Emergency Pack => No
2013-10-22 17:23VictorVillarRelationship addeddepends on 0023701
2013-10-22 17:23VictorVillarIssue Monitored: networkb
2015-03-10 12:16VictorVillarTypedesign defect => defect
2015-05-19 13:14aferrazStatusnew => scheduled
2015-05-19 13:14aferrazAssigned Todmiguelez => aferraz
2015-05-21 18:11aferrazNote Added: 0077631
2015-06-03 13:04hgbotCheckin
2015-06-03 13:04hgbotNote Added: 0078015
2015-06-03 13:04hgbotStatusscheduled => resolved
2015-06-03 13:04hgbotResolutionopen => fixed
2015-06-03 13:04hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4bcd10789da10e5694c1a88d431326b350766468 [^]
2015-06-03 13:04hgbotCheckin
2015-06-03 13:04hgbotNote Added: 0078016
2015-06-03 13:05dmiguelezReview Assigned To => dmiguelez
2015-06-03 13:05dmiguelezNote Added: 0078017
2015-06-03 13:05dmiguelezStatusresolved => closed
2015-06-04 14:27hudsonbotCheckin
2015-06-04 14:27hudsonbotNote Added: 0078071
2015-06-04 14:27hudsonbotCheckin
2015-06-04 14:27hudsonbotNote Added: 0078072

Notes
(0077631)
aferraz   
2015-05-21 18:11   
Test plan:

As F&B Admin:

- Create a product named Part1 for España Organization.
  Set Attribute Set = Lote

- Create a product named Part2 for España Organization.

- Create a product named Test1 for España Organization.
  Check Bill of Materials = true
  Move to Bill of Materials tab.
  Add a new line with product Part1 and quantity = 2
  Add a new line with product Part2 and quantity = 5
  Click on Verify BOM

- Create a new Goods Receipt.
  Add a line for Part1, attribute set value = L1, quantity = 5, locator = RN-1-0-0.
  Add a line for Part1, attribute set value = L2, quantity = 10, locator = RN-2-0-0.
  Add a line for Part2, quantity = 7, locator = RN-1-0-0.
  Add a line for Part2, quantity = 15, locator = RN-2-0-0.
  Complete it.

- Go to Product window and select Part1 product.
  Move to Stock window and realize the following lines appear:
Locator=Rn-1-0-0 - attribute=L1 - qty=5
Locator=Rn-2-0-0 - attribute=L2 - qty=10

- Go to Product window and select Part2 product.
  Move to Stock window and realize the following lines appear:
Locator=Rn-1-0-0 - qty=7
Locator=Rn-2-0-0 - qty=15

- Go to Client window and set Allow Negative Stock = true

- Create a Bill of Materials Production with name Prueba1 and records created = false.
  Move to Production Plan tab and create a record.
  Select Test1 product and set quantity = 10, locator = RN-0-0-0 and save.
  Click on Create/Process Production.
  Set Product quantity must be on stock = false and click OK.
  Realize Process completed succesfully message is shown

- Move to I/O Products tab and realize the following lines are created:
10 - Test1 - qty=10 - locator=Rn-0-0-0
20 - Part1 - attribute=L2 - qty=-10 - locator=Rn-2-0-0
30 - Part1 - attribute=L1 - qty=-5 - locator=Rn-1-0-0
40 - Part1 - qty=-5 - locator=Rn-0-0-0
50 - Part2 - qty=-7 - locator=Rn-1-0-0
60 - Part2 - qty=-15 - locator=Rn-2-0-0
70 - Part2 - qty=-28 - locator=Rn-0-0-0

- Select line 40 in I/O Products tab
  Set attribute = L0

- Move to Production Plan tab.
  Click on Create/Process Production.
  Set Product quantity must be on stock = false and click OK.
  Realize Process completed succesfully message is shown

- Go to Product window and select Part1 product.
  Move to Stock window and realize the following lines appear:
Locator=Rn-0-0-0 - attribute=L0 - qty=-5

- Go to Product window and select Part2 product.
  Move to Stock window and realize the following lines appear:
Locator=Rn-0-0-0 - qty=-28

- Go to Product window and select Part2 product.
  Move to Stock window and realize the following lines appear:
Locator=Rn-0-0-0 - qty=10

- Repeat the same flow with this configurations:

Client window: Allow Negative Stock = true/false
Bill of Materials Production: Product quantity must be on stock = true
In this case, ProductionLines will not be created if there is not enough stock.
If they are also created (because they have been created manually or they were created with Product quantity must be on stock = false), an error will be shown if there is not enough stock when processing the BOM.

Client window: Allow Negative Stock = false
Bill of Materials Production: Product quantity must be on stock = false
In this case, ProductionLines will only be created for the available stock.
If there are also lines created with more quantity than available stock, an error will be shown if there is not enough stock when processing the BOM.
(0078015)
hgbot   
2015-06-03 13:04   
Repository: erp/devel/pi
Changeset: 4bcd10789da10e5694c1a88d431326b350766468
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu May 21 17:06:23 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4bcd10789da10e5694c1a88d431326b350766468 [^]

Fixes issue 24991: Allow negative stock for BOM production

M_PRODUCTION_RUN.xml has been modified to allow negative stock in Bill of Materials Production.
Now, if "Allow Negative Stock" is enabled in Client window and "Product quantity must be on stock" is disabled in Bill of Materials Production window and there is not enough stock for an input product, negative stock will be generated for that product for the locator defined in Production Plan tab.

---
M src-db/database/model/functions/M_PRODUCTION_RUN.xml
---
(0078016)
hgbot   
2015-06-03 13:04   
Repository: erp/devel/pi
Changeset: 0d48aea6e4c8892f8e41d57ac15190a3daba0d8e
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu May 21 17:09:29 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0d48aea6e4c8892f8e41d57ac15190a3daba0d8e [^]

Related to issue 24991: Fix TestCosting

ProcessInstance must have the client information to avoid errors while calling to store procedures.

---
M src-test/src/org/openbravo/test/costing/TestCosting.java
---
(0078017)
dmiguelez   
2015-06-03 13:05   
Code Review + Testing Ok
(0078071)
hudsonbot   
2015-06-04 14:27   
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/c031eb54738d [^]
Maturity status: Test
(0078072)
hudsonbot   
2015-06-04 14:27   
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/c031eb54738d [^]
Maturity status: Test