[MIG] account_move_fiscal_year: Migration to 16.0
This commit is contained in:
parent
c887c6cd2e
commit
a54563781a
@ -5,7 +5,7 @@
|
|||||||
"name": "Account Move Fiscal Year",
|
"name": "Account Move Fiscal Year",
|
||||||
"summary": """
|
"summary": """
|
||||||
Display the fiscal year on journal entries/item""",
|
Display the fiscal year on journal entries/item""",
|
||||||
"version": "15.0.1.0.1",
|
"version": "16.0.1.0.0",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"author": "ACSONE SA/NV, Odoo Community Association (OCA)",
|
"author": "ACSONE SA/NV, Odoo Community Association (OCA)",
|
||||||
"website": "https://github.com/OCA/account-financial-tools",
|
"website": "https://github.com/OCA/account-financial-tools",
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
* Benjamin Willig <benjamin.willig@acsone.eu>
|
* Benjamin Willig <benjamin.willig@acsone.eu>
|
||||||
* Juany Davila <juany.davila@forgeflow.com>
|
* Juany Davila <juany.davila@forgeflow.com>
|
||||||
|
* Alberto Nieto de Pablos <alberto.nieto@braintec.com> (https://braintec.com)
|
||||||
|
@ -6,38 +6,36 @@ from odoo.tests.common import TransactionCase
|
|||||||
|
|
||||||
|
|
||||||
class TestAccountMoveFiscalYear(TransactionCase):
|
class TestAccountMoveFiscalYear(TransactionCase):
|
||||||
def setUp(self):
|
@classmethod
|
||||||
super(TestAccountMoveFiscalYear, self).setUp()
|
def setUpClass(cls):
|
||||||
self.AccountObj = self.env["account.account"]
|
super().setUpClass()
|
||||||
self.AccountJournalObj = self.env["account.journal"]
|
cls.AccountObj = cls.env["account.account"]
|
||||||
self.AccountMoveObj = self.env["account.move"]
|
cls.AccountJournalObj = cls.env["account.journal"]
|
||||||
self.DateRangeObj = self.env["account.fiscal.year"]
|
cls.AccountMoveObj = cls.env["account.move"]
|
||||||
|
cls.DateRangeObj = cls.env["account.fiscal.year"]
|
||||||
|
|
||||||
self.bank_journal = self.AccountJournalObj.search(
|
cls.bank_journal = cls.AccountJournalObj.search(
|
||||||
[("type", "=", "bank")], limit=1
|
[("type", "=", "bank")], limit=1
|
||||||
)
|
)
|
||||||
|
|
||||||
self.account_type_recv = self.env.ref("account.data_account_type_receivable")
|
cls.account_recv = cls.AccountObj.create(
|
||||||
self.account_type_rev = self.env.ref("account.data_account_type_revenue")
|
|
||||||
|
|
||||||
self.account_recv = self.AccountObj.create(
|
|
||||||
{
|
{
|
||||||
"code": "RECV_DR",
|
"code": "RECVDR",
|
||||||
"name": "Receivable (test)",
|
"name": "Receivable (test)",
|
||||||
"reconcile": True,
|
"reconcile": True,
|
||||||
"user_type_id": self.account_type_recv.id,
|
"account_type": "asset_receivable",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
self.account_sale = self.AccountObj.create(
|
cls.account_sale = cls.AccountObj.create(
|
||||||
{
|
{
|
||||||
"code": "SALE_DR",
|
"code": "SALEDR",
|
||||||
"name": "Receivable (sale)",
|
"name": "Receivable (sale)",
|
||||||
"reconcile": True,
|
"reconcile": True,
|
||||||
"user_type_id": self.account_type_rev.id,
|
"account_type": "income",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
self.date_range_2017 = self.DateRangeObj.create(
|
cls.date_range_2017 = cls.DateRangeObj.create(
|
||||||
{
|
{
|
||||||
"name": "2017",
|
"name": "2017",
|
||||||
"date_from": "2017-01-01",
|
"date_from": "2017-01-01",
|
||||||
@ -45,7 +43,7 @@ class TestAccountMoveFiscalYear(TransactionCase):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
self.date_range_2018 = self.DateRangeObj.create(
|
cls.date_range_2018 = cls.DateRangeObj.create(
|
||||||
{
|
{
|
||||||
"name": "2018",
|
"name": "2018",
|
||||||
"date_from": "2018-01-01",
|
"date_from": "2018-01-01",
|
||||||
|
Loading…
Reference in New Issue
Block a user