diff --git a/modules/account/message.xml b/modules/account/message.xml index 31abd9da79..a6804cf9fd 100644 --- a/modules/account/message.xml +++ b/modules/account/message.xml @@ -9,9 +9,6 @@ this repository contains the full copyright notices and license terms. --> To continue, you must reopen the period "%(period)s" of company "%(company)s" for the date "%(date)s". - - You cannot modify or delete period "%(period)s" because it contains moves. - You cannot create a period in fiscal year "%(fiscalyear)s" because it is closed. diff --git a/modules/account/period.py b/modules/account/period.py index fb3488a810..442852d6e2 100644 --- a/modules/account/period.py +++ b/modules/account/period.py @@ -272,17 +272,6 @@ class Period(Workflow, ModelSQL, ModelView): else: return period - @classmethod - def _check(cls, periods): - Move = Pool().get('account.move') - moves = Move.search([ - ('period', 'in', [p.id for p in periods]), - ], limit=1) - if moves: - raise AccessError( - gettext('account.msg_modify_delete_period_moves', - period=moves[0].period.rec_name)) - @classmethod def search(cls, args, offset=0, limit=None, order=None, count=False, query=False): @@ -362,7 +351,6 @@ class Period(Workflow, ModelSQL, ModelView): @classmethod def delete(cls, periods): - cls._check(periods) super(Period, cls).delete(periods) cls._find_cache.clear()