[IMP] purchase_stock: Remove test_fifo_returns 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:
Laurent Smet
2020-07-31 07:11:33 +00:00
parent 4d35dc3e96
commit 0d8ee78fa5
@@ -2,13 +2,12 @@
import time
from .common import PurchaseTestCommon
from odoo.tests import tagged, Form
from odoo.addons.account.tests.common import AccountTestCommon
from odoo.addons.stock_account.tests.test_anglo_saxon_valuation_reconciliation_common import ValuationReconciliationTestCommon
@tagged('-at_install', 'post_install')
class TestFifoReturns(PurchaseTestCommon, AccountTestCommon):
class TestFifoReturns(ValuationReconciliationTestCommon):
def test_fifo_returns(self):
"""Test to create product and purchase order to test the FIFO returns of the product"""
@@ -21,16 +20,12 @@ class TestFifoReturns(PurchaseTestCommon, AccountTestCommon):
'default_code': 'FIFORET',
'name': 'FIFO Ice Cream',
'type': 'product',
'categ_id': self.env.ref('product.product_category_1').id,
'categ_id': self.stock_account_product_categ.id,
'standard_price': 0.0,
'uom_id': self.env.ref('uom.product_uom_kgm').id,
'uom_po_id': self.env.ref('uom.product_uom_kgm').id,
'description': 'FIFO Ice Cream',
})
product_fiforet_icecream.categ_id.property_cost_method = 'fifo'
product_fiforet_icecream.categ_id.property_valuation = 'real_time'
product_fiforet_icecream.categ_id.property_stock_account_input_categ_id = self.o_expense
product_fiforet_icecream.categ_id.property_stock_account_output_categ_id = self.o_income
# I create a draft Purchase Order for first in move for 10 kg at 50 euro
purchase_order_1 = self.env['purchase.order'].create({