Merge lp:~openerp-dev/openobject-addons/7.0-bug_hr_holiday_1090224-adh into lp:openobject-addons/7.0

Proposed by Anand Dharampuriya(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-bug_hr_holiday_1090224-adh
Merge into: lp:openobject-addons/7.0
Diff against target: 12 lines (+1/-1)
1 file modified
hr_holidays/hr_holidays.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-bug_hr_holiday_1090224-adh
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+217578@code.launchpad.net

Description of the change

Hello,

While you change department of an employee at that time you can see new department_id for that employee. But in database it will carry older department_id.
Here department_id field store its value.
make department_id's store value false. so that it will not store department_id.

Regards
Anand(adh)

To post a comment you must log in.
10015. By Anand Dharampuriya(OpenERP)

Solved while change department of an employee department_id not change.

10016. By Amit Vora(OpenERP)

[MRG] merge with main branch

10017. By Anand Dharampuriya(OpenERP)

[IMP]hr_holidays: while change department of an employee it store oldr department_id in database

Unmerged revisions

10017. By Anand Dharampuriya(OpenERP)

[IMP]hr_holidays: while change department of an employee it store oldr department_id in database

10016. By Amit Vora(OpenERP)

[MRG] merge with main branch

10015. By Anand Dharampuriya(OpenERP)

Solved while change department of an employee department_id not change.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_holidays/hr_holidays.py'
2--- hr_holidays/hr_holidays.py 2013-04-15 15:06:55 +0000
3+++ hr_holidays/hr_holidays.py 2014-05-07 06:20:41 +0000
4@@ -160,7 +160,7 @@
5 'type': fields.selection([('remove','Leave Request'),('add','Allocation Request')], 'Request Type', required=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}, help="Choose 'Leave Request' if someone wants to take an off-day. \nChoose 'Allocation Request' if you want to increase the number of leaves available for someone", select=True),
6 'parent_id': fields.many2one('hr.holidays', 'Parent'),
7 'linked_request_ids': fields.one2many('hr.holidays', 'parent_id', 'Linked Requests',),
8- 'department_id':fields.related('employee_id', 'department_id', string='Department', type='many2one', relation='hr.department', readonly=True, store=True),
9+ 'department_id':fields.related('employee_id', 'department_id', string='Department', type='many2one', relation='hr.department', readonly=True),
10 'category_id': fields.many2one('hr.employee.category', "Employee Tag", help='Category of Employee', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
11 'holiday_type': fields.selection([('employee','By Employee'),('category','By Employee Tag')], 'Allocation Mode', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}, help='By Employee: Allocation/Request for individual Employee, By Employee Tag: Allocation/Request for group of employees in category', required=True),
12 '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)'),