← Back to team overview

openerp-community team mailing list archive

[Merge] lp:~openerp-community/openobject-addons/trunk-bug-1090224 into lp:openobject-addons

 

Dharmang Soni (OpenERP) has proposed merging lp:~openerp-community/openobject-addons/trunk-bug-1090224 into lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #1090224 in OpenERP Addons: "[hr_holidays] When department of employee is changed the leave stores old department id"
  https://bugs.launchpad.net/openobject-addons/+bug/1090224

For more details, see:
https://code.launchpad.net/~openerp-community/openobject-addons/trunk-bug-1090224/+merge/149980

When department of employee is changed the leave stores old department id
-- 
https://code.launchpad.net/~openerp-community/openobject-addons/trunk-bug-1090224/+merge/149980
Your team OpenERP Community is subscribed to branch lp:~openerp-community/openobject-addons/trunk-bug-1090224.
=== modified file 'hr_holidays/hr_holidays.py'
--- hr_holidays/hr_holidays.py	2013-02-01 08:44:04 +0000
+++ hr_holidays/hr_holidays.py	2013-02-22 06:48:22 +0000
@@ -159,7 +159,7 @@
         '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),
         'parent_id': fields.many2one('hr.holidays', 'Parent'),
         'linked_request_ids': fields.one2many('hr.holidays', 'parent_id', 'Linked Requests',),
-        'department_id':fields.related('employee_id', 'department_id', string='Department', type='many2one', relation='hr.department', readonly=True, store=True),
+        'department_id':fields.related('employee_id', 'department_id', string='Department', type='many2one', relation='hr.department', readonly=True, store=False),
         'category_id': fields.many2one('hr.employee.category', "Employee Tag", help='Category of Employee', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
         '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),
         '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)'),


Follow ups