diff --git a/addons/sale_mrp/tests/test_sale_mrp_flow.py b/addons/sale_mrp/tests/test_sale_mrp_flow.py
index 8c6fde71db9..2a1af0ec02b 100644
--- a/addons/sale_mrp/tests/test_sale_mrp_flow.py
+++ b/addons/sale_mrp/tests/test_sale_mrp_flow.py
@@ -37,7 +37,8 @@ class TestSaleMrpFlow(common.TransactionCase):
p.route_ids.add(r)
return p.save()
- self.uom_kg = self.UoM.create({
+ self.uom_kg = self.env['uom.uom'].search([('category_id', '=', self.categ_kgm.id), ('uom_type', '=', 'reference')], limit=1)
+ self.uom_kg.write({
'name': 'Test-KG',
'category_id': self.categ_kgm.id,
'factor_inv': 1,
@@ -50,7 +51,8 @@ class TestSaleMrpFlow(common.TransactionCase):
'uom_type': 'smaller',
'factor': 1000.0,
'rounding': 0.001})
- self.uom_unit = self.UoM.create({
+ self.uom_unit = self.env['uom.uom'].search([('category_id', '=', self.categ_unit.id), ('uom_type', '=', 'reference')], limit=1)
+ self.uom_unit.write({
'name': 'Test-Unit',
'category_id': self.categ_unit.id,
'factor': 1,
diff --git a/addons/stock/tests/common.py b/addons/stock/tests/common.py
index 31a7f78df1d..8c26b60e6f3 100644
--- a/addons/stock/tests/common.py
+++ b/addons/stock/tests/common.py
@@ -45,7 +45,8 @@ class TestStockCommon(common.TransactionCase):
self.productE = self.ProductObj.create({'name': 'Product E', 'type': 'product'})
# Configure unit of measure.
- self.uom_kg = self.UomObj.create({
+ self.uom_kg = self.env['uom.uom'].search([('category_id', '=', self.categ_kgm), ('uom_type', '=', 'reference')], limit=1)
+ self.uom_kg.write({
'name': 'Test-KG',
'category_id': self.categ_kgm,
'factor_inv': 1,
@@ -71,7 +72,8 @@ class TestStockCommon(common.TransactionCase):
'factor': 100000.0,
'rounding': 0.001})
# Check Unit
- self.uom_unit = self.UomObj.create({
+ self.uom_unit = self.env['uom.uom'].search([('category_id', '=', self.categ_unit), ('uom_type', '=', 'reference')], limit=1)
+ self.uom_unit.write({
'name': 'Test-Unit',
'category_id': self.categ_unit,
'factor': 1,
diff --git a/addons/stock_landed_costs/tests/test_stock_landed_costs_rounding.py b/addons/stock_landed_costs/tests/test_stock_landed_costs_rounding.py
index 082d5069ca9..f79d285bd23 100644
--- a/addons/stock_landed_costs/tests/test_stock_landed_costs_rounding.py
+++ b/addons/stock_landed_costs/tests/test_stock_landed_costs_rounding.py
@@ -15,7 +15,8 @@ class TestStockLandedCostsRounding(TestStockLandedCostsCommon):
self._load('stock_account', 'test', 'stock_valuation_account.xml')
# Define undivisible units
- product_uom_unit_round_1 = self.env['uom.uom'].create({
+ product_uom_unit_round_1 = self.env.ref('uom.product_uom_unit')
+ product_uom_unit_round_1.write({
'category_id': self.ref('uom.product_uom_categ_unit'),
'name': 'Undivisible Unit(s)',
'factor': 1.0,
diff --git a/addons/uom/data/uom_data.xml b/addons/uom/data/uom_data.xml
index 59a2c41208c..2c5cf503797 100644
--- a/addons/uom/data/uom_data.xml
+++ b/addons/uom/data/uom_data.xml
@@ -51,17 +51,17 @@
smaller
+
+ Day(s)
+
+
+
Hour(s)
smaller
-
- Day(s)
-
-
-