Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031849Openbravo ERP02. Master data managementpublic2016-01-08 08:552016-01-13 16:21
VictorVillar 
aferraz 
immediatemajoralways
closedfixed 
5
pi 
3.0PR15Q4.2 
vmromanos
Core
No
0031849: Not possible to change the product definition to Stocked under some circumstancies
Not possible to change the product definition to Stocked under some circumstancies
As group admin role,
 Go to Product window:
   Create a new one. Item and stocked = Y
   Org: *
  Price list: Bebidas alegres

Go to physical inventory:
 add 1 unit of this product
Process it.

Go to Goods Shipment window and add 1 unit of this product.
Process it.

Change the definition of the product as Service.

Try to change the definition to Item and Stocked again. You can not do that.

Error: You cannot change the product to stocked because it has completed documents which would generate inventory transactions
If there is a warehouse/sales order document related with a product it should not be possible to change the stocked flag.
No tags attached.
blocks defect 00318353.0PR16Q2 closed aferraz Not possible to change the product definition to Stocked under some circumstancies 
Issue History
2016-01-08 15:03aferrazTypedefect => backport
2016-01-13 16:20hgbotCheckin
2016-01-13 16:20hgbotNote Added: 0083246
2016-01-13 16:20hgbotStatusscheduled => resolved
2016-01-13 16:20hgbotResolutionopen => fixed
2016-01-13 16:20hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q4.2/rev/338ed6567ec897047241d0ceac48bcb987d38b5b [^]
2016-01-13 16:20hgbotCheckin
2016-01-13 16:20hgbotNote Added: 0083247
2016-01-13 16:21vmromanosReview Assigned To => vmromanos
2016-01-13 16:21vmromanosNote Added: 0083248
2016-01-13 16:21vmromanosStatusresolved => closed

Notes
(0083246)
hgbot   
2016-01-13 16:20   
Repository: erp/backports/3.0PR15Q4.2
Changeset: 338ed6567ec897047241d0ceac48bcb987d38b5b
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Jan 11 17:23:56 2016 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR15Q4.2/rev/338ed6567ec897047241d0ceac48bcb987d38b5b [^]

Fixes issue 31849: Not possible to change product to stocked

Stocked flag in Product window will not be updatable in case product is present in any order, invoice or warehouse document.

---
M src-db/database/model/triggers/M_PRODUCT_TRG.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0083247)
hgbot   
2016-01-13 16:20   
Repository: erp/backports/3.0PR15Q4.2
Changeset: af90ae22aecc87fe790fc8a30de502c8db2eee3c
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Jan 13 15:31:26 2016 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR15Q4.2/rev/af90ae22aecc87fe790fc8a30de502c8db2eee3c [^]

Related to issue 31849: code review improvements

The old messages have been reverted because it could be used by external modules, so it could be considered as a functional API Change.
Create a new message instead and improve it to be more descriptive.

Modified pl/sql comment to reflect the new behavior and to avoid confusions in the future

---
M src-db/database/model/triggers/M_PRODUCT_TRG.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0083248)
vmromanos   
2016-01-13 16:21   
Code review + testing OK