[IMP] mrp_landed_costs: Remove test_stock_landed_costs_mrp dependency to AccountTestCommon
l10n runbot builds are all failing when running at least one test depending of AccountTestCommon because it: - doesn't create a sandboxed testing environnement to manage the multi-currency, multi-company, the default company's currency, the exchange rates... - doesn't setup a testing user then all tests are done using the superuser. - doesn't provide a fully setup chart of accounts: exchange difference journal is not set, accounts have bad types, etc... - is run sometimes at-install. --task: 2301180
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user