summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-05-31 16:13:49 +0200
committerChristophe Simonis <chs@odoo.com>2019-05-31 16:13:49 +0200
commitb1970c6f08d66cf5ae1ef2471d48d7f219bcd2fb (patch)
tree8912cd418d6b29a9464b41022dba116f9d414d0a /addons
parent6c16a1f3ba200f86f13d157af6e681042f0d25b5 (diff)
[FIX] stock_account: correctly force cost_method in tests
Oversight of previous forward-port.
Diffstat (limited to 'addons')
-rw-r--r--addons/stock_account/tests/test_stockvaluation.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/stock_account/tests/test_stockvaluation.py b/addons/stock_account/tests/test_stockvaluation.py
index 1315586a208..f4bed504115 100644
--- a/addons/stock_account/tests/test_stockvaluation.py
+++ b/addons/stock_account/tests/test_stockvaluation.py
@@ -997,7 +997,7 @@ class TestStockValuation(TransactionCase):
self.assertEqual(move9.remaining_qty, 0.0) # unused in out moves
def test_fifo_perpetual_3(self):
- self.product1.cost_method = 'fifo'
+ self.product1.categ_id.property_cost_method = 'fifo'
# in 10 @ 100
move1 = self.env['stock.move'].create({
@@ -1110,7 +1110,7 @@ class TestStockValuation(TransactionCase):
def test_fifo_perpetual_4(self):
""" Fifo and return handling.
"""
- self.product1.cost_method = 'fifo'
+ self.product1.categ_id.property_cost_method = 'fifo'
# in 8 @ 10
move1 = self.env['stock.move'].create({
@@ -2588,7 +2588,7 @@ class TestStockValuation(TransactionCase):
self.assertAlmostEqual(self.product1.stock_value, 0.0)
def test_average_perpetual_6(self):
- self.product1.product_tmpl_id.cost_method = 'average'
+ self.product1.categ_id.property_cost_method = 'average'
move1 = self.env['stock.move'].create({
'name': 'Receive 1 unit at 10',
@@ -2625,7 +2625,7 @@ class TestStockValuation(TransactionCase):
""" Test edit in the past. Receive 5@10, receive 10@20, edit the first move to receive
15 instead.
"""
- self.product1.product_tmpl_id.cost_method = 'average'
+ self.product1.categ_id.property_cost_method = 'average'
move1 = self.env['stock.move'].create({
'name': 'IN 5@10',
@@ -2665,7 +2665,7 @@ class TestStockValuation(TransactionCase):
""" Receive 1@10, then dropship 1@20, finally return the dropship. Dropship should not
impact the price.
"""
- self.product1.product_tmpl_id.cost_method = 'average'
+ self.product1.categ_id.property_cost_method = 'average'
move1 = self.env['stock.move'].create({
'name': 'IN 1@10',