From 77457bd8b2763013623936be27edcbcd7edfa551 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Mon, 20 Jan 2014 12:49:01 +0100 Subject: [PATCH 1/4] [FIX] calendar: type of related field should be 'integer', not 'int' bzr revid: rco@openerp.com-20140120114901-ryrqgu0drewsjx4y --- addons/calendar/calendar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/calendar/calendar.py b/addons/calendar/calendar.py index 38f4e30a764..aede7757514 100644 --- a/addons/calendar/calendar.py +++ b/addons/calendar/calendar.py @@ -831,7 +831,7 @@ class calendar_event(osv.Model): 'end_date': fields.date('Repeat Until'), 'allday': fields.boolean('All Day', states={'done': [('readonly', True)]}), 'user_id': fields.many2one('res.users', 'Responsible', states={'done': [('readonly', True)]}), - 'color_partner_id': fields.related('user_id', 'partner_id', 'id', type="int", string="colorize", store=False), # Color of creator + 'color_partner_id': fields.related('user_id', 'partner_id', 'id', type="integer", string="colorize", store=False), # Color of creator 'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the event alarm information without removing it."), 'categ_ids': fields.many2many('calendar.event.type', 'meeting_category_rel', 'event_id', 'type_id', 'Tags'), 'attendee_ids': fields.one2many('calendar.attendee', 'event_id', 'Attendees', ondelete='cascade'), From 16028dedfd1db44013c8a30dac86096bcad0b8d4 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Mon, 20 Jan 2014 13:59:53 +0100 Subject: [PATCH 2/4] [FIX] calendar: function field of type 'selection' must be given a selection parameter bzr revid: rco@openerp.com-20140120125953-zk6iwkvye4reansl --- addons/calendar/calendar.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/addons/calendar/calendar.py b/addons/calendar/calendar.py index aede7757514..6162d3cb8cf 100644 --- a/addons/calendar/calendar.py +++ b/addons/calendar/calendar.py @@ -100,8 +100,15 @@ class calendar_attendee(osv.Model): result[id][name] = attdata.event_id.date_deadline return result + STATE_SELECTION = [ + ('needsAction', 'Needs Action'), + ('tentative', 'Uncertain'), + ('declined', 'Declined'), + ('accepted', 'Accepted'), + ] + _columns = { - 'state': fields.selection([('needsAction', 'Needs Action'), ('tentative', 'Uncertain'), ('declined', 'Declined'), ('accepted', 'Accepted')], 'Status', readonly=True, help="Status of the attendee's participation"), + 'state': fields.selection(STATE_SELECTION, 'Status', readonly=True, help="Status of the attendee's participation"), 'cn': fields.function(_compute_data, string='Common name', type="char", multi='cn', store=True), 'partner_id': fields.many2one('res.partner', 'Contact', readonly="True"), 'email': fields.char('Email', help="Email of Invited Person"), @@ -799,7 +806,7 @@ class calendar_event(osv.Model): 'state': fields.selection([('draft', 'Unconfirmed'), ('open', 'Confirmed')], string='Status', readonly=True, track_visibility='onchange'), 'name': fields.char('Meeting Subject', required=True, states={'done': [('readonly', True)]}), 'is_attendee': fields.function(_compute, string='Attendee', type="boolean", multi='attendee'), - 'attendee_status': fields.function(_compute, string='Attendee Status', type="selection", multi='attendee'), + 'attendee_status': fields.function(_compute, string='Attendee Status', type="selection", selection=calendar_attendee.STATE_SELECTION, multi='attendee'), 'display_time': fields.function(_compute, string='Event Time', type="char", multi='attendee'), 'date': fields.datetime('Date', states={'done': [('readonly', True)]}, required=True, track_visibility='onchange'), 'date_deadline': fields.datetime('End Date', states={'done': [('readonly', True)]}, required=True,), From 9b31f30c298615c4201ee258ef5af3182df0b2e5 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 20 Jan 2014 16:44:22 +0100 Subject: [PATCH 3/4] [FIX] edi: /edi/import_edi_url route is a json route bzr revid: chs@openerp.com-20140120154422-blccmtrql7mlwmvn --- addons/edi/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/edi/controllers/main.py b/addons/edi/controllers/main.py index 149c0f62ff6..86115d12d4b 100644 --- a/addons/edi/controllers/main.py +++ b/addons/edi/controllers/main.py @@ -26,7 +26,7 @@ class EDI(openerp.http.Controller): 'init': 's.edi.edi_import("%s");' % safe_url, } - @openerp.http.route('/edi/import_edi_url', type='http', auth='none') + @openerp.http.route('/edi/import_edi_url', type='json', auth='none') def import_edi_url(self, url): req = openerp.http.request result = req.session.proxy('edi').import_edi_url(req.session._db, req.session._uid, req.session._password, url) From e516362da433c59333746e5cd527a4dee795a7a2 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 20 Jan 2014 17:40:54 +0100 Subject: [PATCH 4/4] [IMP] calendar: tell orm to rename old select1 column bzr revid: chs@openerp.com-20140120164054-ia6pw4svp3ylww5w --- addons/calendar/calendar.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/calendar/calendar.py b/addons/calendar/calendar.py index 6162d3cb8cf..f0862601611 100644 --- a/addons/calendar/calendar.py +++ b/addons/calendar/calendar.py @@ -2,7 +2,7 @@ ############################################################################## # # OpenERP, Open Source Business Applications -# Copyright (c) 2011 OpenERP S.A. +# Copyright (c) 2011-2014 OpenERP S.A. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -831,7 +831,7 @@ class calendar_event(osv.Model): 'fr': fields.boolean('Fri'), 'sa': fields.boolean('Sat'), 'su': fields.boolean('Sun'), - 'month_by': fields.selection([('date', 'Date of month'), ('day', 'Day of month')], 'Option'), + 'month_by': fields.selection([('date', 'Date of month'), ('day', 'Day of month')], 'Option', oldname='select1'), 'day': fields.integer('Date of month'), 'week_list': fields.selection([('MO', 'Monday'), ('TU', 'Tuesday'), ('WE', 'Wednesday'), ('TH', 'Thursday'), ('FR', 'Friday'), ('SA', 'Saturday'), ('SU', 'Sunday')], 'Weekday'), 'byday': fields.selection([('1', 'First'), ('2', 'Second'), ('3', 'Third'), ('4', 'Fourth'), ('5', 'Fifth'), ('-1', 'Last')], 'By day'),