diff --git a/addons/mrp_landed_costs/tests/test_stock_landed_costs_mrp.py b/addons/mrp_landed_costs/tests/test_stock_landed_costs_mrp.py index 173891f09eb..686a35abd8d 100644 --- a/addons/mrp_landed_costs/tests/test_stock_landed_costs_mrp.py +++ b/addons/mrp_landed_costs/tests/test_stock_landed_costs_mrp.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from odoo.addons.account.tests.common import AccountTestCommon +from odoo.addons.stock_account.tests.test_anglo_saxon_valuation_reconciliation_common import ValuationReconciliationTestCommon from odoo.tests import tagged, Form @tagged('post_install', '-at_install') -class TestStockLandedCostsMrp(AccountTestCommon): +class TestStockLandedCostsMrp(ValuationReconciliationTestCommon): @classmethod def setUpClass(cls): @@ -16,7 +16,7 @@ class TestStockLandedCostsMrp(AccountTestCommon): cls.picking_type_in_id = cls.env.ref('stock.picking_type_in') cls.picking_type_out_id = cls.env.ref('stock.picking_type_out') cls.supplier_location_id = cls.env.ref('stock.stock_location_suppliers') - cls.stock_location_id = cls.env.ref('stock.stock_location_stock') + cls.stock_location_id = cls.company_data['default_warehouse'].lot_stock_id cls.customer_location_id = cls.env.ref('stock.stock_location_customers') cls.categ_all = cls.env.ref('product.product_category_all') # Create product refrigerator & oven @@ -64,8 +64,8 @@ class TestStockLandedCostsMrp(AccountTestCommon): cls.product_refrigerator.categ_id.property_cost_method = 'fifo' cls.product_refrigerator.categ_id.property_valuation = 'real_time' - cls.product_refrigerator.categ_id.property_stock_account_input_categ_id = cls.o_expense - cls.product_refrigerator.categ_id.property_stock_account_output_categ_id = cls.o_income + cls.product_refrigerator.categ_id.property_stock_account_input_categ_id = cls.company_data['default_account_stock_in'] + cls.product_refrigerator.categ_id.property_stock_account_output_categ_id = cls.company_data['default_account_stock_out'] # Create service type product 1.Labour 2.Brokerage 3.Transportation 4.Packaging cls.landed_cost = cls.env['product.product'].create({