summaryrefslogtreecommitdiff
path: root/addons/uom/tests
diff options
context:
space:
mode:
authorjdoutreloux <jud@odoo.com>2019-11-07 11:23:18 +0000
committerYannick Tivisse <yti@odoo.com>2020-01-13 11:19:17 +0000
commit52ed0be17e80aa6bcc24d59620dd3462b6d577c3 (patch)
tree40eba75a87dd071b8d59747a2c5d4c90a4f26660 /addons/uom/tests
parent34dd971ddc17b4d5eac83f229c587367ed045318 (diff)
[IMP] uom : remove 'measure_type' field
This removes the measure_type field which has become unused and causes issues when users try to add new uom categories. Task-2043927 closes odoo/odoo#41056 Related: odoo/enterprise#6945 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/uom/tests')
-rw-r--r--addons/uom/tests/test_uom.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/addons/uom/tests/test_uom.py b/addons/uom/tests/test_uom.py
index 935bb6a12cb..48728b18bcd 100644
--- a/addons/uom/tests/test_uom.py
+++ b/addons/uom/tests/test_uom.py
@@ -51,7 +51,7 @@ class TestUom(TransactionCase):
def test_30_reference_uniqueness(self):
""" Check the uniqueness of the reference UoM in a category """
- time_category = self.env['uom.category'].search([('measure_type', '=', 'working_time')], limit=1)
+ time_category = self.env.ref('uom.product_uom_categ_unit')
with self.assertRaises(ValidationError):
self.env['uom.uom'].create({
@@ -62,12 +62,6 @@ class TestUom(TransactionCase):
'category_id': time_category.id
})
- def test_31_reference_uniqueness(self):
- """ Check the uniqueness of the reference UoM in a category """
- time_category = self.env['uom.category'].search([('measure_type', '=', 'working_time')], limit=1)
- with self.assertRaises(ValidationError):
- self.env['uom.uom'].search([('measure_type', '=', 'unit'), ('uom_type', '=', 'reference')]).category_id = time_category
-
def test_40_custom_uom(self):
""" A custom UoM is an UoM in a category without measurement type. It should behave like a normal UoM """
category = self.env['uom.category'].create({