Initial commit: Odoo 18.0-20251222 extra-addons
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled

This commit is contained in:
tocmo0nlord
2026-03-13 20:43:25 +00:00
parent 36e847a7df
commit adbe430761
9472 changed files with 1265727 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import test_account_journal_restrict_mode

View File

@@ -0,0 +1,33 @@
# Copyright 2023 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.exceptions import UserError
from odoo.tests import tagged
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
@tagged("post_install", "-at_install")
class TestAccountJournalRestrictMode(AccountTestInvoicingCommon):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.env = cls.env(
context=dict(
cls.env.context,
test_account_journal_restrict_mode=True,
)
)
cls.account_journal_obj = cls.env["account.journal"]
cls.company_obj = cls.env["res.company"]
cls.currency_obj = cls.env["res.currency"]
cls.chart_template_obj = cls.env["account.chart.template"]
cls.country_be = cls.env.ref("base.be") # Refs
def test_journal_default_lock_entries(self):
journal = self.account_journal_obj.create(
{"name": "Test Journal", "code": "TJ", "type": "general"}
)
self.assertTrue(journal.restrict_mode_hash_table)
with self.assertRaises(UserError):
journal.write({"restrict_mode_hash_table": False})