Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0032934
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2016-05-11 17:312018-01-26 10:51
ReporterngarciaView Statuspublic 
Assigned Tomarkmm82 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision408ed751de81
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toaferraz
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0032934: Wrong definition of convertUOM function in RestoreStockValue_data.xsql

DescriptionWrong definition of convertUOM function in RestoreStockValue_data.xsql. It should be changed from callableStatement to preparedStatement
Steps To ReproduceAs system admin role:
   Set as Displayed the fields related with second UOM feature in Windows Tab and Fields window, for Purchaser Order window, Lines Tab:
      Order UOM
      Order Quantity
   Set as Active the tabs used in that feature:
      Product window - UOM tab
      Unit Of Measure window - Conversion tab

   Install the org.openbravo.module.fixstock module (it is not available in the module management window, it is on https://code.openbravo.com/erp/pmods [^] repository)
As group admin role:
   Create a product
   Add a new unit in the UOM tab
   Configure the conversion between both of them
   Add a purchase price to it
   Create a purchase order and add the previously created order
   You should fill the Order Quantity and Order UOM fields
   Book it
   Create a partial goods receipt from it
   Check there is an entry in the m_storage_pending for that product
   Go to Process Request window and launch the Fix Stock process
   Check the following error message is shown in the log

867946fe 12275108 [DefaultQuartzScheduler_Worker-7] ERROR org.openbravo.module.fixstock.RestoreStockValue -
java.lang.NullPointerException
    at java.math.BigDecimal.<init>(BigDecimal.java:739)
    at org.openbravo.module.fixstock.RestoreStockValue.addSalesOrderEntries(RestoreStockValue.java:590)
    at org.openbravo.module.fixstock.RestoreStockValue.doExecute(RestoreStockValue.java:70)
    at org.openbravo.service.db.DalBaseProcess.execute(DalBaseProcess.java:82)
    at org.openbravo.scheduling.DefaultJob.execute(DefaultJob.java:62)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)

Check there is no entry in the m_storage_pending for that product
It is also reproducible in sales flow
Proposed SolutionChange the following code

<SqlMethod name="convertUOM" type="callableStatement" connection="true" return="string">

with

<SqlMethod name="convertUOM" type="preparedStatement" connection="true" return="string">

in RestoreStockValue_data.xsql
TagsFix Stock
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0032943 closedmarkmm82 'Fix Stock QuantityOrder Process' should round the Order quantity of the opening physical inventory to the std precision 
related to defect 0032951 closedalostale Fix Stock process rounds the quantities to 6 decimals and it should not 
depends on defect 0028459 closededuardo_Argal It is necessary a modulescript to solve stock inconsistencies 
blocks defect 0032935 closedmarkmm82 Data is pending to be created in M_STORAGE_PENDING by the Fix Stock process 

-  Notes
(0086447)
markmm82 (developer)
2016-05-13 22:18

Test plan:
As system admin role:
   Set as Displayed the fields related with second UOM feature:
      Order UOM
      Order Quantity
   Set as Active the tabs used in that feature:
      Product - UOM
      Unit Of Measure - Conversion
   Install the org.openbravo.module.fixstock module
   Go to Unit of Measure window, select "Unit" and go to conversion tab
      Configure the conversion between both of them (Unit -> Liter)

As group admin role:
   Create a product
    Name: P01,
    UOM: Unit,
    Purchase: true
   Add a new unit in the UOM tab
    UOM: Liter
   Go to Price tab
    Add a purchase price to it, for instance "Tarifa La Fruta es la Vida"
   Go to Purchase order window and add the previously created product P01
       You should fill the Order Quantity and Order UOM fields
    Book it
   Create a partial goods receipt from it
    Complete it
   Check there is an entry in the m_storage_pending for that product
   Go to Process Request window
    Create a new process
        Process: Fix Stock
        Timing: Run immediately
    Schedule the Fix Stock process
   After run the process you will find as result in the process monitor:
    Status: Success
    Process log:
        2016-05-13 14:26:30.011 - Entries deleted: 192
        2016-05-13 14:26:30.038 - Number of draft shipment/receipt entries: 0
        2016-05-13 14:26:30.051 - Number of not processed internal consumption entries: 0
        2016-05-13 14:26:30.06 - Number of not processed inventory count entries: 0
        2016-05-13 14:26:30.081 - Number of not processed internal movement entries: 0
        2016-05-13 14:26:30.092 - Number of not processed production entries: 0
        2016-05-13 14:26:35.356 - Number of transaction entries: 496
        2016-05-13 14:26:35.37 - Entries deleted: 8
        2016-05-13 14:26:36.063 - Number of sales order lines: 50
        2016-05-13 14:26:36.633 - Number of purchase order lines: 1
        2016-05-13 14:26:36.64 - Number of reservation entries: 0
        2016-05-13 14:26:36.647 - Process completed successfully
(0086624)
hgbot (developer)
2016-05-20 15:13

Repository: erp/pmods/org.openbravo.module.fixstock
Changeset: 408ed751de816784e82cff02effc965d64cbdc99
Author: Mark <markmm82 <at> gmail.com>
Date: Sun May 15 19:15:17 2016 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.module.fixstock/rev/408ed751de816784e82cff02effc965d64cbdc99 [^]

Fixes issue 32934 & Fixes issue 32935: Error in Fix Stock process

Data is created in M_STORAGE_PENDING by the Fix Stock process.
The c_uom_id is passed to the convertUOM function instead of the m_product_uom_id.
Correct definition of convertUOM function in RestoreStockValue_data.xsql.

---
M src/org/openbravo/module/fixstock/RestoreStockValue.java
M src/org/openbravo/module/fixstock/RestoreStockValue_data.xsql
---
(0086627)
hgbot (developer)
2016-05-20 15:13

Repository: erp/pmods/org.openbravo.module.fixstock
Changeset: d3c9a8b3561c70b89f6de33faf318dc04c6165e3
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri May 20 15:12:58 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.module.fixstock/rev/d3c9a8b3561c70b89f6de33faf318dc04c6165e3 [^]

Related to issue 32934 & Related to issue 32935: Update module version

---
M src-db/database/sourcedata/AD_MODULE.xml
---
(0086629)
aferraz (manager)
2016-05-20 15:14

Code review + Testing OK

- Issue History
Date Modified Username Field Change
2016-05-11 17:31 ngarcia New Issue
2016-05-11 17:31 ngarcia Assigned To => Triage Finance
2016-05-11 17:31 ngarcia Modules => Core
2016-05-11 17:31 ngarcia Resolution time => 1466200800
2016-05-11 17:31 ngarcia Triggers an Emergency Pack => No
2016-05-11 17:32 ngarcia Relationship added depends on 0028459
2016-05-11 17:32 ngarcia Issue Monitored: networkb
2016-05-11 17:35 ngarcia Steps to Reproduce Updated View Revisions
2016-05-11 17:39 ngarcia Relationship added blocks 0032935
2016-05-11 17:53 aferraz Assigned To Triage Finance => markmm82
2016-05-12 17:02 markmm82 Status new => scheduled
2016-05-13 22:18 markmm82 Note Added: 0086447
2016-05-16 17:38 aferraz Relationship added related to 0032943
2016-05-16 17:39 aferraz Relationship added related to 0032951
2016-05-17 11:51 psanjuan Steps to Reproduce Updated View Revisions
2016-05-20 15:13 hgbot Checkin
2016-05-20 15:13 hgbot Note Added: 0086624
2016-05-20 15:13 hgbot Status scheduled => resolved
2016-05-20 15:13 hgbot Resolution open => fixed
2016-05-20 15:13 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.module.fixstock/rev/408ed751de816784e82cff02effc965d64cbdc99 [^]
2016-05-20 15:13 hgbot Checkin
2016-05-20 15:13 hgbot Note Added: 0086627
2016-05-20 15:14 aferraz Review Assigned To => aferraz
2016-05-20 15:14 aferraz Note Added: 0086629
2016-05-20 15:14 aferraz Status resolved => closed
2018-01-26 10:51 ngarcia Tag Attached: Fix Stock


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker