From 2234f4003859eb6820b13bfed08b6dd627a5b91c Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Thu, 28 Oct 2010 13:19:37 +0200 Subject: [PATCH 1/3] [FIX] project: typo: 'Alien' -> 'Aline' bzr revid: olt@tinyerp.com-20101028111937-bwn6z1r0yv5mnj6t --- addons/crm_helpdesk/crm_helpdesk.py | 2 +- addons/project/project_demo.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/crm_helpdesk/crm_helpdesk.py b/addons/crm_helpdesk/crm_helpdesk.py index f2570a8c57c..1508704d2d6 100644 --- a/addons/crm_helpdesk/crm_helpdesk.py +++ b/addons/crm_helpdesk/crm_helpdesk.py @@ -64,7 +64,7 @@ class crm_helpdesk(crm.crm_case, osv.osv): 'categ_id': fields.many2one('crm.case.categ', 'Category', \ domain="[('section_id','=',section_id),\ ('object_id.model', '=', 'crm.helpdesk')]"), - 'duration': fields.float('Duration'), + 'duration': fields.float('Duration', states={'done': [('readonly', True)]}), 'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True, help='The state is set to \'Draft\', when a case is created.\ \nIf the case is in progress the state is set to \'Open\'.\ diff --git a/addons/project/project_demo.xml b/addons/project/project_demo.xml index 7e315b265a7..3f2d9bad868 100644 --- a/addons/project/project_demo.xml +++ b/addons/project/project_demo.xml @@ -35,7 +35,7 @@ jth - Alien + Aline apr apr From ab9e19e5958596128cf36fdcad83b1c601fae93f Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Thu, 28 Oct 2010 17:18:43 +0530 Subject: [PATCH 2/3] [FIX] hr: replace tab char with white space bzr revid: hmo@tinyerp.com-20101028114843-ujbpmns3ybtqm8s3 --- addons/hr/hr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr/hr.py b/addons/hr/hr.py index c0ac7f473a4..26abd4171a5 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -183,7 +183,7 @@ class hr_employee(osv.osv): return {'value': {'work_email' : work_email}} def _get_photo(self, cr, uid, context=None): - photo_path = addons.get_module_resource('hr','image','photo.png') + photo_path = addons.get_module_resource('hr','image','photo.png') return open(photo_path, 'rb').read().encode('base64') _defaults = { From 6de4c3eb3ab87a7de1e048b6e72e54e52d13188b Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Thu, 28 Oct 2010 14:09:20 +0200 Subject: [PATCH 3/3] [FIX] base_calendar: use 'onchange_dates' instead of 'onchange_allday' since it also returns duration bzr revid: olt@tinyerp.com-20101028120920-qb6mg4oxyn8df9x7 --- addons/base_calendar/base_calendar.py | 10 +++++++++- addons/base_calendar/base_calendar_view.xml | 2 +- addons/crm/crm_meeting_view.xml | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index dfbdc745613..c3aa7bb8720 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -916,7 +916,7 @@ class calendar_event(osv.osv): return [(x.lower(), x) for x in pytz.all_timezones] def onchange_allday(self, cr, uid, ids, allday, context=None): - """Sets duration as 24 Hours if event is selcted for all day + """Sets duration as 24 Hours if event is selected for all day @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @@ -1630,6 +1630,14 @@ true, it will allow you to hide the event alarm information without removing it. if vals.get('vtimezone', '') and vals.get('vtimezone', '').startswith('/freeassociation.sourceforge.net/tzfile/'): vals['vtimezone'] = vals['vtimezone'][40:] + updated_vals = self.onchange_dates(cr, uid, [], + vals.get('date', False), + vals.get('duration', False), + vals.get('date_deadline', False), + vals.get('allday', False), + context=context) + vals.update(updated_vals.get('value', {})) + res = super(calendar_event, self).create(cr, uid, vals, context) alarm_obj = self.pool.get('res.alarm') alarm_obj.do_alarm_create(cr, uid, [res], self._name, 'date', context=context) diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml index 9f27e79d5a5..e9dbd2aa297 100644 --- a/addons/base_calendar/base_calendar_view.xml +++ b/addons/base_calendar/base_calendar_view.xml @@ -229,7 +229,7 @@ - + diff --git a/addons/crm/crm_meeting_view.xml b/addons/crm/crm_meeting_view.xml index a028e3e0e64..12f0a3f59cc 100644 --- a/addons/crm/crm_meeting_view.xml +++ b/addons/crm/crm_meeting_view.xml @@ -32,7 +32,7 @@ - +