From 2420492c26410c2d01cd18bacbbf2fb2d76f7f80 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 3 May 2019 16:33:02 +0200 Subject: [PATCH] [FIX] purchase_stock: adapt newly added test Set properties directly on product category instead of via (readonly) related fields on product template --- addons/purchase_stock/tests/test_stockvaluation.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/purchase_stock/tests/test_stockvaluation.py b/addons/purchase_stock/tests/test_stockvaluation.py index 708fb05aa17..4ec032f9db0 100644 --- a/addons/purchase_stock/tests/test_stockvaluation.py +++ b/addons/purchase_stock/tests/test_stockvaluation.py @@ -894,10 +894,10 @@ class TestStockValuationWithCOA(AccountingTestCase): date_invoice = '2019-01-16' date_invoice1 = '2019-01-20' + self.product1.categ_id.property_valuation = 'real_time' + self.product1.categ_id.property_cost_method = 'average' product_avg = self.product1.product_tmpl_id.copy({ - 'valuation': 'real_time', 'purchase_method': 'purchase', - 'cost_method': 'average', 'name': 'AVG', 'standard_price': 60, 'property_account_creditor_price_difference': self.price_diff_account.id @@ -966,6 +966,7 @@ class TestStockValuationWithCOA(AccountingTestCase): po = self.env['purchase.order'].create({ 'currency_id': self.eur_currency.id, 'partner_id': self.partner_id.id, + 'date_order': date_po, 'order_line': [ (0, 0, { 'name': product_avg.name,