Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029298Openbravo ERP04. Warehouse managementpublic2015-03-16 18:102015-05-07 22:16
VictorVillar 
aferraz 
immediatemajoralways
closedfixed 
5
pi 
3.0PR15Q3 
vmromanos
Core
No
0029298: It should not be possible to change the unit of measure conversion
It should not be possible to change the unit of measure conversion
It is necessary to show the fields/tabs related with second uom. (conversion tab in UOM window, Uom tab in product window...)
As group Admin role,
  Create a new conversion for Unit. Second unit of measure: hour
 Multiply rate by: 3
 Divide Rate by: 0.33

Assing this second uom to product: Agua

Create a new physical inventory for one product
 add: 40 hours
 main unit of measure: 120
Process it.

After that change the the conversion to:
Multiply rate by:0.1
Divide Rate by: 10

Create a new physical inventory
 add: 100 hours
 main unit of measure: 10

So the total is:
 Unit: 130
 second unit of measure: 140 (hours)

So the conversion is: 140/130 = 1.07

After that change the the conversion to:
Multiply rate by:3
Divide Rate by: 0.33

Go to Sales order:
 Document type: POS order
 create one register for Agua
   second qty: 40
   main unit of measure: 120
Complete it.

Go to Goods Shipment created.
 realise that the second unit of measure qty is: 43,076923077
 and the main unit of measure qty is: 120

The reason is: m_inout_create function
 
v_ActualQty:=ROUND(v_storage.QtyOrder*(v_LocatorQty/v_storage.QtyOnHand), v_storage.stdprecision) ;

where v_storage.QtyOrder= 140 v_LocatorQty= 120 v_storage.QtyOnHand= 130



 
It is necessary to decide if it should be possible to change the rate if there is stock of any product with these units
No tags attached.
Issue History
2015-03-16 18:10VictorVillarNew Issue
2015-03-16 18:10VictorVillarAssigned To => Sandrahuguet
2015-03-16 18:10VictorVillarModules => Core
2015-03-16 18:10VictorVillarResolution time => 1429135200
2015-03-16 18:10VictorVillarTriggers an Emergency Pack => No
2015-03-16 18:10VictorVillarIssue Monitored: networkb
2015-03-18 17:02reinaldoguerraAssigned ToSandrahuguet => reinaldoguerra
2015-03-18 17:02reinaldoguerraStatusnew => scheduled
2015-03-30 13:59jonalegriaesarteTarget Version3.0PR15Q2 => 3.0PR15Q3
2015-04-15 16:10aferrazAssigned Toreinaldoguerra => aferraz
2015-04-17 13:06aferrazNote Added: 0076605
2015-04-23 13:03aferrazNote Edited: 0076605bug_revision_view_page.php?bugnote_id=0076605#r8338
2015-04-24 08:50hgbotCheckin
2015-04-24 08:50hgbotNote Added: 0076737
2015-04-24 08:50hgbotStatusscheduled => resolved
2015-04-24 08:50hgbotResolutionopen => fixed
2015-04-24 08:50hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/cd77e2cf07ed8403aa07f8a553e69d900d01a67a [^]
2015-04-24 08:52vmromanosReview Assigned To => vmromanos
2015-04-24 08:52vmromanosNote Added: 0076738
2015-04-24 08:52vmromanosStatusresolved => closed
2015-05-07 22:16hudsonbotCheckin
2015-05-07 22:16hudsonbotNote Added: 0077151

Notes
(0076605)
aferraz   
2015-04-17 13:06   
(edited on: 2015-04-23 13:03)
Test plan:

Go to "Unit of measure" window. Select one record and move to "Conversion" tab.
Create one record and save it.
- Realize "Uom To", "Multiplicate Rate by" and "Divide Rate by" fields are no longer editable.

Check "Conversion" tab shows now the following errors:

A insert error when:
- Inserting a new UOM Conversion record and another one already exists using the same uomFrom - uomTo
- Updating the uom field of a UOM Conversion record and another one already exists using the same uomFrom - uomTo
- Activating a UOM Conversion record and another one already exists using the same uomFrom - uomTo

An update error when:
- Updating the multiplyrateby field or the dividerateby field of a UOM Conversion record

(0076737)
hgbot   
2015-04-24 08:50   
Repository: erp/devel/pi
Changeset: cd77e2cf07ed8403aa07f8a553e69d900d01a67a
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Apr 23 12:57:48 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/cd77e2cf07ed8403aa07f8a553e69d900d01a67a [^]

Fixes issue 29298: It should not be possible to change the UOM Conversion

"To UOM", "Multiple Rate By" and "Divide Rate By" fields are now not updateable. Also, an event handler has been created to show different errors following this criteria:

A insert error when:
Inserting a new UOM Conversion record and another one already exists using the same uomFrom - uomTo
Updating the uom field of a UOM Conversion record and another one already exists using the same uomFrom - uomTo
Activating a UOM Conversion record and another one already exists using the same uomFrom - uomTo

An update error when:
Updating the multiplyrateby field or the dividerateby field of a UOM Conversion record

---
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
A src/org/openbravo/event/UOMConversionEventHandler.java
---
(0076738)
vmromanos   
2015-04-24 08:52   
Code review + testing OK
(0077151)
hudsonbot   
2015-05-07 22:16   
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/a1817f84bd8b [^]
Maturity status: Test