Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040722Openbravo ERP04. Warehouse managementpublic2019-04-30 13:312019-08-22 14:45
egoitz 
collazoandy4 
urgentmajoralways
closedfixed 
5
 
3.0PR19Q4 
Sandrahuguet
Core
No
0040722: MovementDate is filled with time and should contain only with the date
In some customers it has been discover that there are rows in the transaction table containin values with date time on the movement date column when only date should be saved.
-Check the code.

src/org/openbravo/materialmgmt/refinventory/ReferencedInventoryUtil.java: header.setMovementDate(new Date());

src/org/openbravo/erpCommon/ad_actionButton/ProcessGoods.java: inv.setMovementDate(new Date());


Truncate the date:

Example.

src/org/openbravo/common/actionhandler/ReservedGoodMovementActionHandler.java: gmHeader.setMovementDate(DateUtils.truncate(new Date(), Calendar.DATE));



Check if platform team can implement something to automatically truncate the value if the referencce is date (not date/time).
No tags attached.
related to defect 0040676 closed dmiguelez Valued Stock Report not properly working when movementDate has more precision than days and aggregated data 
depends on design defect 0040905 new AugustoMauch It would be fine to automatically truncate the value if the reference is date 
Not all the children of this issue are yet resolved or closed.
Issue History
2019-04-30 13:31egoitzNew Issue
2019-04-30 13:31egoitzAssigned To => Triage Finance
2019-04-30 13:31egoitzModules => Core
2019-04-30 13:31egoitzTriggers an Emergency Pack => No
2019-04-30 13:31egoitzIssue generated from0040676
2019-04-30 13:31egoitzRelationship addedrelated to 0040676
2019-04-30 13:32egoitzNote Added: 0111386
2019-04-30 13:32egoitzResolution time => 1559167200
2019-04-30 16:54SandrahuguetAssigned ToTriage Finance => nonofrancisco
2019-05-06 15:16SandrahuguetAssigned Tononofrancisco => Triage Finance
2019-05-20 08:34SandrahuguetRelationship addeddepends on 0040905
2019-08-06 10:46SandrahuguetAssigned ToTriage Finance => collazoandy4
2019-08-07 15:16collazoandy4Statusnew => scheduled
2019-08-08 12:36collazoandy4Note Added: 0113904
2019-08-14 12:49SandrahuguetNote Added: 0114014
2019-08-14 13:30hgbotCheckin
2019-08-14 13:30hgbotNote Added: 0114015
2019-08-14 13:30hgbotStatusscheduled => resolved
2019-08-14 13:30hgbotResolutionopen => fixed
2019-08-14 13:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/52183b3014d42acf9b5708ae90dad8e71720ea23 [^]
2019-08-14 13:31hgbotCheckin
2019-08-14 13:31hgbotNote Added: 0114016
2019-08-14 13:32SandrahuguetReview Assigned To => Sandrahuguet
2019-08-14 13:32SandrahuguetNote Added: 0114017
2019-08-14 13:32SandrahuguetStatusresolved => closed
2019-08-14 13:32SandrahuguetFixed in Version => 3.0PR19Q4
2019-08-22 14:45hudsonbotCheckin
2019-08-22 14:45hudsonbotNote Added: 0114225

Notes
(0111386)
egoitz   
2019-04-30 13:32   
Also other modules should be reviewed:
AWO
Autobom for retail
(0113904)
collazoandy4   
2019-08-08 12:36   
Test Plan
  Go to Referenced Inventory window, execute the Box process and check in database the movementdate from previous process created in M_Movement is truncated to the current date

Test Plan II - Picking List module
  Enable the Picking List Auto Close preference
  Go to Warehouse and set Rn-1-0-0 as Outbound
  Create and complete a new Sales Order for Cerveza Lager 0,5L
  Go to Warehouse Picking List and create a new record with Document Type: Picking List outbound
    Clic on Sales Order button and select the previous order created
    Clic on Assing button and select Openbravo
    Clic on Confirm button and check in database the M_InOut and M_Movement created has the movement date truncated

Test Plan III - AWO
  Execute the AWOTestSuite.java and check in the database the M_Inventory, OBAWO_Inventory_Prop, M_InOut and M_Movement records created today has a movement date truncated
(0114014)
Sandrahuguet   
2019-08-14 12:49   
We have decided not to create a modulescript because it can cause performance problems.

Sql to fix data:

update M_Inventory set movementdate =trunc (movementdate);
update M_Movement set movementdate =trunc (movementdate);
update OBAWO_Inventory_Prop set movementdate = trunc (movementdate);
update M_InOut set movementdate = trunc (movementdate);
update M_transaction set movementdate = trunc (movementdate);
(0114015)
hgbot   
2019-08-14 13:30   
Repository: erp/devel/pi
Changeset: 52183b3014d42acf9b5708ae90dad8e71720ea23
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Wed Aug 14 12:29:32 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/52183b3014d42acf9b5708ae90dad8e71720ea23 [^]

Fixes issue 40722:MovementDate is filled with time and should contain only with
the date

The M_Inventory and M_Movement movementDate was truncated to the date

---
M src/org/openbravo/erpCommon/ad_actionButton/ProcessGoods.java
M src/org/openbravo/materialmgmt/refinventory/ReferencedInventoryUtil.java
---
(0114016)
hgbot   
2019-08-14 13:31   
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: 486041f4ab466be99ecd64503b04870696ff34ee
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Wed Aug 14 13:30:05 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/486041f4ab466be99ecd64503b04870696ff34ee [^]

Related to issue 40722:Truncated the movement date in M_Inventory, M_InOut,
OBAWO_Inventory_Prop and M_Movement

---
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/utils/AWOTestUtils.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/centralbroker/InternalMovementGenerator.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/centralbroker/InventoryCountGenerator.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/centralbroker/ShipmentInOutGenerator.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/utils/InventoryProposalUtils.java
---
(0114017)
Sandrahuguet   
2019-08-14 13:32   
code review + testing ok
(0114225)
hudsonbot   
2019-08-22 14:45   
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/ad3efd3bd07c [^]
Maturity status: Test