diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index eb7b44b8a3d..f58e68ce7ed 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -206,7 +206,14 @@ class hr_holidays(osv.osv):
raise osv.except_osv(_('Warning!'),_('You cannot delete a leave which is in %s state!')%(rec.state))
return super(hr_holidays, self).unlink(cr, uid, ids, context)
- def onchange_date_from(self, cr, uid, ids, date_to, date_from):
+ def onchange_date_from(self, cr, uid, ids, date_from):
+ DATETIME_FORMAT = "%Y-%m-%d %H:%M:%S"
+ date_to = False
+ if date_from:
+ date_to = datetime.datetime.strptime(date_from, DATETIME_FORMAT) + datetime.timedelta(hours=8)
+ return {'value':{'date_to': str(date_to)}}
+
+ def onchange_date_to(self, cr, uid, ids, date_to, date_from):
result = {}
if date_to and date_from:
diff_day = self._get_number_of_days(date_from, date_to)
diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml
index ea9a7fe3a66..a5d31b127c6 100644
--- a/addons/hr_holidays/hr_holidays_view.xml
+++ b/addons/hr_holidays/hr_holidays_view.xml
@@ -104,8 +104,8 @@
-
-
+
+
days
diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py
index 049cb93ca1e..765dc1d816a 100644
--- a/addons/hr_recruitment/hr_recruitment.py
+++ b/addons/hr_recruitment/hr_recruitment.py
@@ -259,6 +259,17 @@ class hr_applicant(base_stage, osv.Model):
stage_id = stage_ids and stage_ids[0] or False
return {'value': {'stage_id': stage_id}}
+ def onchange_partner_id(self, cr, uid, ids, partner_id, context=None):
+ data = {'partner_phone': False,
+ 'partner_mobile': False,
+ 'email_from': False}
+ if partner_id:
+ addr = self.pool.get('res.partner').browse(cr, uid, partner_id, context)
+ data.update({'partner_phone': addr.phone,
+ 'partner_mobile': addr.mobile,
+ 'email_from': addr.email})
+ return {'value': data}
+
def stage_find(self, cr, uid, cases, section_id, domain=[], order='sequence', context=None):
""" Override of the base.stage method
Parameter of the stage search taken from the lead:
diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml
index 08484889cf1..1867b76ef40 100644
--- a/addons/hr_recruitment/hr_recruitment_view.xml
+++ b/addons/hr_recruitment/hr_recruitment_view.xml
@@ -135,7 +135,7 @@
+ on_change="onchange_partner_id(partner_id)"/>