[MIG] account_lock_to_date: Migration to 15.0

This commit is contained in:
Miquel Raïch
2023-02-22 15:54:43 +01:00
parent 5e0d610fe0
commit 23f2bd4bc4
4 changed files with 12 additions and 5 deletions

View File

@@ -5,7 +5,7 @@
"name": "Account Lock To Date",
"summary": """
Allows to set an account lock date in the future.""",
"version": "14.0.1.0.0",
"version": "15.0.1.0.0",
"license": "AGPL-3",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-financial-tools",

View File

@@ -10,8 +10,8 @@ class AccountMove(models.Model):
def _check_lock_to_dates(self):
"""Prevent moves that are on or after lock to date.
Advisors have more freedom then other users and are only constrained
by the ficalyear_lock_to_date.
Advisors have more freedom than other users and are only constrained
by the fiscalyear_lock_to_date.
Other users will also be restricted by the period_lock_to_date.
"""
is_advisor = self.user_has_groups("account.group_account_manager")
@@ -31,14 +31,14 @@ class AccountMove(models.Model):
message = _(
"You cannot add/modify entries after and "
"inclusive of the lock to date %s"
) % (lock_to_date)
) % (lock_to_date,)
else:
message = _(
"You cannot add/modify entries after and "
"inclusive of the lock to date %s. "
"Check the company settings or ask someone "
"with the 'Adviser' role"
) % (lock_to_date)
) % (lock_to_date,)
raise ValidationError(message)
def action_post(self):

View File

@@ -0,0 +1 @@
../../../../account_lock_to_date

View File

@@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)