Merge lp:~openerp-dev/openobject-addons/6.0-opw-382055-ado into lp:openobject-addons/6.0

Proposed by Amit Dodiya (OpenERP)
Status: Merged
Approved by: Naresh(OpenERP)
Approved revision: no longer in the source branch.
Merged at revision: 5147
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw-382055-ado
Merge into: lp:openobject-addons/6.0
Diff against target: 12 lines (+1/-1)
1 file modified
account/account.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-opw-382055-ado
Reviewer Review Type Date Requested Status
Leonardo Pistone (community) Approve
Naresh(OpenERP) Pending
Amit Dodiya (OpenERP) Pending
nel Pending
Review via email: mp+92941@code.launchpad.net

This proposal supersedes a proposal from 2012-02-03.

Description of the change

Hello,

[FIX] Accounting managers cannot create a new journal (permissions on ir sequence type)"

Accounting/Managers have access to accounting configuration.

However, if they try to create a journal, they get the error :
"You can not create this document (ir.sequence.type) ! Be sure your user belongs to one of these groups: Administration / Configuration."

Thanks,
Amit

To post a comment you must log in.
Revision history for this message
Leonardo Pistone (lepistone) wrote : Posted in a previous version of this proposal

Thanks Amit.

IMO, your fix works, but gives full power to account managers to sequences and sequence types which could be dangerous for some. A safer and cleaner option could be to backport what Fabien did for trunk here,

http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/revision/5917

i.e. using the uid 1 (admin) just for creating the sequence.

Revision history for this message
Leonardo Pistone (lepistone) : Posted in a previous version of this proposal
review: Disapprove
Revision history for this message
Amit Dodiya (OpenERP) (ado-openerp) wrote : Posted in a previous version of this proposal

Hello Leonardo,

Thanks for the information.

The code is changed as per the comment.

Thanks,
Amit

Revision history for this message
Amit Dodiya (OpenERP) (ado-openerp) : Posted in a previous version of this proposal
review: Needs Resubmitting
Revision history for this message
Leonardo Pistone (lepistone) wrote : Posted in a previous version of this proposal

Thanks!

review: Approve
Revision history for this message
Leonardo Pistone (lepistone) wrote :

Again, this is OK, and should be merged.

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account.py'
2--- account/account.py 2012-01-31 11:03:20 +0000
3+++ account/account.py 2012-02-14 10:25:26 +0000
4@@ -689,7 +689,7 @@
5
6 def create(self, cr, uid, vals, context=None):
7 if not 'sequence_id' in vals or not vals['sequence_id']:
8- vals.update({'sequence_id': self.create_sequence(cr, uid, vals, context)})
9+ vals.update({'sequence_id': self.create_sequence(cr, 1, vals, context)})
10 return super(account_journal, self).create(cr, uid, vals, context)
11
12 def name_get(self, cr, user, ids, context=None):