[MIG] partner_statement: Migration to 18.0

This commit is contained in:
kobros-tech
2025-02-12 02:20:49 +03:00
committed by Miquel Raïch
parent 7899fff564
commit b054d48e24
9 changed files with 36 additions and 15 deletions

View File

@@ -5,7 +5,8 @@
from dateutil.relativedelta import relativedelta
from odoo import fields
from odoo.tests.common import Form, TransactionCase, new_test_user
from odoo.tests import Form
from odoo.tests.common import TransactionCase, new_test_user
class TestOutstandingStatement(TransactionCase):

View File

@@ -1,6 +1,6 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import TransactionCase
from odoo.tests import TransactionCase, users
class TestResConfigSettings(TransactionCase):
@@ -27,6 +27,7 @@ class TestResConfigSettings(TransactionCase):
cls.account_user = cls.cr.fetchone()[0]
cls.user_obj = cls.env["res.users"].with_user(cls.account_user)
@users("admin")
def test_groups(self):
conf = self.config.create(
{
@@ -36,11 +37,12 @@ class TestResConfigSettings(TransactionCase):
}
)
conf.set_values()
self.admin_user = self.env.ref("base.user_admin")
self.assertFalse(
self.user_obj._has_group("partner_statement.group_outstanding_statement")
self.admin_user._has_group("partner_statement.group_outstanding_statement")
)
self.assertTrue(
self.user_obj._has_group("partner_statement.group_activity_statement")
self.admin_user._has_group("partner_statement.group_activity_statement")
)
res = (
self.env["activity.statement.wizard"]