Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020711Openbravo ERP05. Production managementpublic2012-06-08 12:272012-07-26 09:43
dmiguelez 
dmiguelez 
immediatemajoralways
closedfixed 
20Community Appliance
 
3.0MP14 
Core
No
0020711: API Change Request
In the Product Window,

For validating a BOM there is actually a Database Procedure called M_Product_BOM_Check, that is called from a button.
This procedure is not working as expected, since it can result in false positives when checking for cycles.

The solution I propose to fix it is to create a Java process to replace it, since it will be easier to maintain in the future than a Database procedure because it will reduce the complexity of the procedure.
I propose this change because this procedure is not used anywhere else.
I searched in the application, and in the modules that are in the repository, and it is only used when is called from the button in the Product window.

So, since to fix the issue this procedure must be rewritten almost from scratch, and is not used or called anywhere else, I believe that it would be better to replace it with a Java procedure, easier to maintain.

Then, we can deprecate the database procedure, but it might be better if we just eliminate it, because, as I said, it's not working as expected, and if we deprecate it we won't be supporting it.
So maybe the right call would be to delete it, and support the new Java procedure.

I have checked that this procedure is not used in diferent places. I have checked it also in all the modules of the Central Repository and in two different client's instances
Login as Openbravo/openbravo

Change rol to QA Testing Admin.

Go to Product Window and create a new Product:
"Organization": USA
"Search Key": PD
"Name": Product D
"Product Category": Bill of Materials
"Bill of Materials": Checked

Move to Bill of Materials tab.
Create a new record.
"BOM Product":Raw Material A
"BOM Quantity": 1
Create a new record.
"BOM Product":Raw Material B
"BOM Quantity": 1
Create a new record.
"BOM Product":Raw Material C
"BOM Quantity": 1

Click on Verify BOM, thenk OK. "Process completed successfully"

Create a new Product:
"Organization": USA
"Search Key": PE
"Name": Product E
"Product Category": Bill of Materials
"Bill of Materials": Checked

Move to Bill of Materials tab.
Create a new record.
"BOM Product":Raw Material A
"BOM Quantity": 1
Create a new record.
"BOM Product":Product E
"BOM Quantity": 1

Click on Verify BOM, thenk OK.
Error "BOM Tree Contains a Cycle"
Change the Database Procedure with Java code and delete the Procedure.
No tags attached.
related to defect 0020652 closed dmiguelez Bill of Materials validation results in a false positive 
Issue History
2012-06-08 12:27dmiguelezNew Issue
2012-06-08 12:27dmiguelezAssigned To => iciordia
2012-06-08 12:27dmiguelezModules => Core
2012-06-08 12:27dmiguelezRelationship addedrelated to 0020652
2012-06-13 08:43iciordiaNote Added: 0049787
2012-06-13 08:43iciordiaAssigned Toiciordia => dmiguelez
2012-07-11 16:31hgbotCheckin
2012-07-11 16:31hgbotNote Added: 0050495
2012-07-11 16:31hgbotStatusnew => resolved
2012-07-11 16:31hgbotResolutionopen => fixed
2012-07-11 16:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/api-checks/rev/660935d8700a8fa7fb21a0a52513966f710021f7 [^]
2012-07-19 10:29hgbotCheckin
2012-07-19 10:29hgbotNote Added: 0050743
2012-07-19 12:26hgbotCheckin
2012-07-19 12:26hgbotNote Added: 0050748
2012-07-19 12:26hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/api-checks/rev/660935d8700a8fa7fb21a0a52513966f710021f7 [^] => http://code.openbravo.com/erp/devel/api-checks/rev/c5e57999f9c9ecf12fa52d0b48853a3513e3fd80 [^]
2012-07-19 12:27hgbotCheckin
2012-07-19 12:27hgbotNote Added: 0050749
2012-07-26 09:43miruritaNote Added: 0050887
2012-07-26 09:43miruritaStatusresolved => closed
2012-07-26 09:43miruritaFixed in Version => 3.0MP14

Notes
(0049787)
iciordia   
2012-06-13 08:43   
Approved.

Ismael
(0050495)
hgbot   
2012-07-11 16:31   
Repository: erp/devel/api-checks
Changeset: 660935d8700a8fa7fb21a0a52513966f710021f7
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Wed Jul 11 16:14:04 2012 +0200
URL: http://code.openbravo.com/erp/devel/api-checks/rev/660935d8700a8fa7fb21a0a52513966f710021f7 [^]

Fixes issue 20711: Remove M_PRODUCT_BOM_CHECK - API Change Request

---
R model/src-db/database/model/functions/M_PRODUCT_BOM_CHECK.xml
---
(0050743)
hgbot   
2012-07-19 10:29   
Repository: erp/devel/api-checks
Changeset: ffb4564be2f38b309ae601c09626675820c48ca3
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Thu Jul 19 10:28:31 2012 +0200
URL: http://code.openbravo.com/erp/devel/api-checks/rev/ffb4564be2f38b309ae601c09626675820c48ca3 [^]

Related to issue 20711: remove ActionButtonData.process136 fixes int-api/3164/

---
M java/reference/java.japi.gz
---
(0050748)
hgbot   
2012-07-19 12:26   
Repository: erp/devel/api-checks
Changeset: c5e57999f9c9ecf12fa52d0b48853a3513e3fd80
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Thu Jul 19 12:14:41 2012 +0200
URL: http://code.openbravo.com/erp/devel/api-checks/rev/c5e57999f9c9ecf12fa52d0b48853a3513e3fd80 [^]

Fixes issue 20711: Remove M_PRODUCT_BOM_CHECK - API Change Request

---
R model/src-db/database/model/functions/M_PRODUCT_BOM_CHECK.xml
---
(0050749)
hgbot   
2012-07-19 12:27   
Repository: erp/devel/api-checks
Changeset: 5ffb599646c1eee4e16b3e024f6214a9f44ef318
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Thu Jul 19 12:23:06 2012 +0200
URL: http://code.openbravo.com/erp/devel/api-checks/rev/5ffb599646c1eee4e16b3e024f6214a9f44ef318 [^]

Related to issue 20711: remove ActionButtonData.process136 fixes int-api/3164/

---
M java/reference/java.japi.gz
---
(0050887)
mirurita   
2012-07-26 09:43   
API change process completed successfully.