summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2019-06-19 14:19:01 +0000
committerMartin Trigaux <mat@odoo.com>2019-07-03 11:16:24 +0000
commite2bd3e328aa0a4e2a438a3b0e9f3fc3fa5601b62 (patch)
treee8ea69368ee309b1dca0ba2f0fe3824b203d7251 /addons
parentdd2fae2ead6ea00dfc7e7a6e1d3a0a5624e478f7 (diff)
[IMP] odoo: remove LazyCursor
Was specifically created for decimal.precision at f0646cb51b236a3afd5 Should no longer be needed
Diffstat (limited to 'addons')
-rw-r--r--addons/stock/tests/test_move2.py12
1 files changed, 0 insertions, 12 deletions
diff --git a/addons/stock/tests/test_move2.py b/addons/stock/tests/test_move2.py
index 53246be2705..635d1b6c121 100644
--- a/addons/stock/tests/test_move2.py
+++ b/addons/stock/tests/test_move2.py
@@ -1814,18 +1814,9 @@ class TestSinglePicking(TestStockCommon):
class TestStockUOM(TestStockCommon):
def setUp(self):
super(TestStockUOM, self).setUp()
- self.setUpCache()
-
- def setUpCache(self):
dp = self.env.ref('product.decimal_product_uom')
dp.digits = 7
- # Trick: invoke the method 'precision_get' with the current environment.
- # This fills in the cache of the method with the right value. If we
- # don't do that, the registry will access the corresponding precision
- # with a new cursor (LazyCursor), and get a different value!
- self.assertEqual(dp.precision_get(dp.name), 7)
-
def test_pickings_transfer_with_different_uom_and_back_orders(self):
""" Picking transfer with diffrent unit of meassure. """
# weight category
@@ -1852,9 +1843,6 @@ class TestStockUOM(TestStockCommon):
'tracking': 'lot',
})
- # creating a variant invalidates the cache
- self.setUpCache()
-
picking_in = self.env['stock.picking'].create({
'partner_id': self.partner_delta_id,
'picking_type_id': self.picking_type_in,