From ba8241deb43013107de22157f8f1f4c8b684559e Mon Sep 17 00:00:00 2001 From: "qdp-launchpad@tinyerp.com" <> Date: Fri, 27 Aug 2010 11:20:12 +0200 Subject: [PATCH] [IMP] account: useability... removed the role 'period', and added group 'account / managers' on the button to reopen a closed period bzr revid: qdp-launchpad@tinyerp.com-20100827092012-61i93xb9ia0upqe5 --- addons/account/account.py | 11 ++++------- addons/account/account_view.xml | 7 +------ 2 files changed, 5 insertions(+), 13 deletions(-) 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 @@ -