Merge lp:~openerp-dev/openobject-addons/6.1-opw-574989-xal into lp:openobject-addons/6.1

Proposed by Xavier ALT
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 6808
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-574989-xal
Merge into: lp:openobject-addons/6.1
Diff against target: 12 lines (+1/-1)
1 file modified
hr_holidays/ (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-574989-xal
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email:

Description of the change


This MP fix an AccessError when changing "Leave Type" field on an existing "Leave Request" when new "Leave Type" have a different value of "double_validation".

As an admin user:

- Install module "hr_holidays"
- Modfify "Compenatory Days", check the "Double validation" field, then Save
- Make sure "demo" user have a employee configured

As demo user:

- Create a new leave request
  * description = Test
  * leave type = Legal Leaves (so no double validation)
  * start date = TODAY
  * end date = TODAY
- Save
- Edit and change leave type to "Compensatory Days" (so with double validation)
- Save

Current: raise access on "" (i.e. Leave Type)
Expected: no AccessError


To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :


This bug is not reproducible on Trunk , also on runbot too . If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Naresh Soni

Unmerged revisions

6808. By Xavier ALT

[FIX] hr_holidays: leave request 'double_validation' related field should be readonly

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_holidays/'
2--- hr_holidays/ 2012-01-03 13:52:24 +0000
3+++ hr_holidays/ 2012-05-23 11:23:23 +0000
4@@ -136,7 +136,7 @@
5 'category_id': fields.many2one('hr.employee.category', "Category", help='Category of Employee'),
6 'holiday_type': fields.selection([('employee','By Employee'),('category','By Employee Category')], 'Allocation Type', help='By Employee: Allocation/Request for individual Employee, By Employee Category: Allocation/Request for group of employees in category', required=True),
7 'manager_id2': fields.many2one('hr.employee', 'Second Approval', readonly=True, help='This area is automaticly filled by the user who validate the leave with second level (If Leave type need second validation)'),
8- 'double_validation': fields.related('holiday_status_id', 'double_validation', type='boolean', relation='hr.holidays.status', string='Apply Double Validation'),
9+ 'double_validation': fields.related('holiday_status_id', 'double_validation', type='boolean', relation='hr.holidays.status', string='Apply Double Validation', readonly=True),
10 }
11 _defaults = {
12 'employee_id': _employee_get,