2
0

[MIG] account_move_fiscal_month: Migration to 16.0

This commit is contained in:
BT-anieto 2023-08-04 08:43:00 +02:00
parent 1bb31a1e4d
commit 93352eeb86
3 changed files with 23 additions and 24 deletions

View File

@ -4,7 +4,7 @@
{
"name": "Account Move Fiscal Month",
"summary": """Display the fiscal month on journal entries/item""",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-financial-tools",

View File

@ -1 +1,2 @@
* Benjamin Willig <benjamin.willig@acsone.eu>
* Alberto Nieto de Pablos <alberto.nieto@braintec.com> (https://braintec.com)

View File

@ -6,65 +6,63 @@ from odoo.tests.common import TransactionCase
class TestAccountMoveFiscalMonth(TransactionCase):
def setUp(self):
super(TestAccountMoveFiscalMonth, self).setUp()
self.AccountObj = self.env["account.account"]
self.AccountJournalObj = self.env["account.journal"]
self.AccountMoveObj = self.env["account.move"]
self.DateRangeObj = self.env["date.range"]
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.AccountObj = cls.env["account.account"]
cls.AccountJournalObj = cls.env["account.journal"]
cls.AccountMoveObj = cls.env["account.move"]
cls.DateRangeObj = cls.env["date.range"]
self.bank_journal = self.AccountJournalObj.search(
cls.bank_journal = cls.AccountJournalObj.search(
[("type", "=", "bank")], limit=1
)
self.account_type_recv = self.env.ref("account.data_account_type_receivable")
self.account_type_rev = self.env.ref("account.data_account_type_revenue")
self.account_recv = self.AccountObj.create(
cls.account_recv = cls.AccountObj.create(
{
"code": "RECV_DR",
"code": "RECVDR",
"name": "Receivable (test)",
"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)",
"reconcile": True,
"user_type_id": self.account_type_rev.id,
"account_type": "income",
}
)
self.date_range_type_month = self.env.ref(
cls.date_range_type_month = cls.env.ref(
"account_fiscal_month.date_range_fiscal_month"
)
self.date_range_january_2017 = self.DateRangeObj.create(
cls.date_range_january_2017 = cls.DateRangeObj.create(
{
"name": "January 2017",
"date_start": "2017-01-01",
"date_end": "2017-01-31",
"type_id": self.date_range_type_month.id,
"type_id": cls.date_range_type_month.id,
}
)
self.date_range_february_2017 = self.DateRangeObj.create(
cls.date_range_february_2017 = cls.DateRangeObj.create(
{
"name": "February 2017",
"date_start": "2017-02-01",
"date_end": "2017-02-28",
"type_id": self.date_range_type_month.id,
"type_id": cls.date_range_type_month.id,
}
)
self.date_range_january_2018 = self.DateRangeObj.create(
cls.date_range_january_2018 = cls.DateRangeObj.create(
{
"name": "January 2018",
"date_start": "2018-01-01",
"date_end": "2018-01-31",
"type_id": self.date_range_type_month.id,
"type_id": cls.date_range_type_month.id,
}
)