diff --git a/addons/account/account.py b/addons/account/account.py index 93e5c0b03a5..fbbc93d1f85 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -883,13 +883,10 @@ class account_period(osv.osv): return ids def action_draft(self, cr, uid, ids, *args): - users_roles = self.pool.get('res.users').browse(cr, uid, uid).roles_id - for role in users_roles: - if role.name=='Period': - mode = 'draft' - for id in ids: - cr.execute('update account_journal_period set state=%s where period_id=%s', (mode, id)) - cr.execute('update account_period set state=%s where id=%s', (mode, id)) + mode = 'draft' + for id in ids: + cr.execute('update account_journal_period set state=%s where period_id=%s', (mode, id)) + cr.execute('update account_period set state=%s where id=%s', (mode, id)) return True def name_search(self, cr, user, name, args=None, operator='ilike', context={}, limit=80): diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 249186bd700..8bfb69e4d71 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -85,11 +85,6 @@ Period --> - - - Assign this role to the persons that should have the rights to re-open a closed period. - - account.period.form account.period @@ -105,7 +100,7 @@ -