From ff4fe2c05e35ccbf435583474a942512363b4cb5 Mon Sep 17 00:00:00 2001 From: Pariket Trivedi Date: Wed, 21 May 2014 16:34:34 +0530 Subject: [PATCH 01/44] [FIX]: change correct label and fields in Event Analysis. --- addons/event/report/report_event_registration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/event/report/report_event_registration.py b/addons/event/report/report_event_registration.py index 595d3947687..1ce3591a105 100644 --- a/addons/event/report/report_event_registration.py +++ b/addons/event/report/report_event_registration.py @@ -37,7 +37,7 @@ class report_event_registration(osv.osv): 'draft_state': fields.integer(' # No of Draft Registrations', size=20), 'confirm_state': fields.integer(' # No of Confirmed Registrations', size=20), 'register_max': fields.integer('Maximum Registrations'), - 'nbevent': fields.integer('Number Of Events'), + 'nbevent': fields.integer('Number of Registrations in Events'), 'event_type': fields.many2one('event.type', 'Event Type'), 'registration_state': fields.selection([('draft', 'Draft'), ('confirm', 'Confirmed'), ('done', 'Attended'), ('cancel', 'Cancelled')], 'Registration State', readonly=True, required=True), 'event_state': fields.selection([('draft', 'Draft'), ('confirm', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Event State', readonly=True, required=True), @@ -68,7 +68,7 @@ class report_event_registration(osv.osv): to_char(e.date_begin, 'YYYY-MM-DD') AS event_date, to_char(e.date_begin, 'YYYY') AS year, to_char(e.date_begin, 'MM') AS month, - count(e.id) AS nbevent, + count(r.id) AS nbevent, CASE WHEN r.state IN ('draft') THEN r.nb_register ELSE 0 END AS draft_state, CASE WHEN r.state IN ('open','done') THEN r.nb_register ELSE 0 END AS confirm_state, e.type AS event_type, From a77123fcccff56c5745abf1737122cb846fd711c Mon Sep 17 00:00:00 2001 From: Pariket Trivedi Date: Thu, 22 May 2014 11:49:09 +0530 Subject: [PATCH 02/44] [FIX]: Bad display in kanban view with a group by in Event. --- addons/event/static/src/css/event.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/event/static/src/css/event.css b/addons/event/static/src/css/event.css index ff5bfaba19b..53c03cc03f0 100644 --- a/addons/event/static/src/css/event.css +++ b/addons/event/static/src/css/event.css @@ -1,7 +1,7 @@ .oe_event_date{ border-top-left-radius:3px; border-top-right-radius:3px; - font-size: 48px; + font-size: 36px; height: auto; font-weight: bold; text-align: center; From 6d65ff1f99f14cdbc32f2f0a31a9930ea9f1a086 Mon Sep 17 00:00:00 2001 From: Pariket Trivedi Date: Thu, 22 May 2014 11:56:28 +0530 Subject: [PATCH 03/44] [FIX]:IE9 Kanban: The 'show more' button is not display correctly. --- addons/web/static/src/css/base.css | 3 +++ addons/web/static/src/css/base.sass | 2 ++ 2 files changed, 5 insertions(+) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 8c2da02d969..d7c40480e11 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -3392,6 +3392,9 @@ body.oe_single_form .oe_single_form_container { .openerp_ie .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button { filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#EFEFEF', endColorstr='#D8D8D8'); } +.openerp_ie .oe_webclient { + height: auto !important; +} @media print { .openerp { diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index b18e4fc65d8..090cf3de0fe 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -2736,6 +2736,8 @@ body.oe_single_form // jquery ui for ie .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#EFEFEF', endColorstr='#D8D8D8') + .oe_webclient + height: auto !important // }}} // @media print {{{ From 74eb6624207758f565842b1d5ee1c621b85105dc Mon Sep 17 00:00:00 2001 From: fka-odoo Date: Tue, 3 Jun 2014 19:04:07 +0530 Subject: [PATCH 04/44] [FIX] display_name is not compute for non-active partner --- addons/account_report_company/account_report_company.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_report_company/account_report_company.py b/addons/account_report_company/account_report_company.py index 6915657ba84..fe5d237adf2 100644 --- a/addons/account_report_company/account_report_company.py +++ b/addons/account_report_company/account_report_company.py @@ -31,7 +31,7 @@ class res_partner(osv.Model): return dict(self.name_get(cr, uid, ids, context=context)) _display_name_store_triggers = { - 'res.partner': (lambda self,cr,uid,ids,context=None: self.search(cr, uid, [('id','child_of',ids)]), + 'res.partner': (lambda self,cr,uid,ids,context=None: self.search(cr, uid, [('id','child_of',ids)], context=dict(active_test=False)), ['parent_id', 'is_company', 'name'], 10) } From 8796e07afcecfccfe5b09cf0f9cb79e93024f1e6 Mon Sep 17 00:00:00 2001 From: Ravi Gohil Date: Mon, 9 Jun 2014 18:20:02 +0530 Subject: [PATCH 05/44] [FIX] mail: Speep improvement when sending email using 'Send by Email' wizard. (Maintenance Case: 606994) --- addons/mail/mail_message.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index 4280983f288..3f491df82b7 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -881,9 +881,11 @@ class mail_message(osv.Model): fol_ids = fol_obj.search(cr, SUPERUSER_ID, [ ('res_model', '=', message.model), ('res_id', '=', message.res_id), - ('subtype_ids', 'in', message.subtype_id.id) ], context=context) - partners_to_notify |= set(fo.partner_id for fo in fol_obj.browse(cr, SUPERUSER_ID, fol_ids, context=context)) + partners_to_notify |= set( + fo.partner_id for fo in fol_obj.browse(cr, SUPERUSER_ID, fol_ids, context=context) + if message.subtype_id.id in [st.id for st in fo.subtype_ids] + ) # remove me from notified partners, unless the message is written on my own wall if message.author_id and message.model == "res.partner" and message.res_id == message.author_id.id: partners_to_notify |= set([message.author_id]) From 0b4921e4d6c075ff47dbe3356433b698b61008b3 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 12 Jun 2014 12:24:48 +0200 Subject: [PATCH 06/44] parse_value: interger != float Wwhen parsing a integer field, do not accept float values. '1' or '1.0' is ok but not '1.1'. (opw 608544) --- addons/web/static/src/js/formats.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/formats.js b/addons/web/static/src/js/formats.js index 3280b9f4f75..0c3577b2671 100644 --- a/addons/web/static/src/js/formats.js +++ b/addons/web/static/src/js/formats.js @@ -228,7 +228,8 @@ instance.web.parse_value = function (value, descriptor, value_if_empty) { value = value.replace(instance.web._t.database.parameters.thousands_sep, ""); } while(tmp !== value); tmp = Number(value); - if (isNaN(tmp)) + // do not accept not numbers or float values + if (isNaN(tmp) || tmp % 1) throw new Error(_.str.sprintf(_t("'%s' is not a correct integer"), value)); return tmp; case 'float': From 86acc1a62ffd1bdbbf79a6d315287baf5a5cea2b Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 12 Jun 2014 16:14:41 +0200 Subject: [PATCH 07/44] [FIX] orm: avoir errors reading twice a field _read_flat: remove duplicated fields in read call get many2one: as False is instance of int, check the value of x first to avoid calling a name_get with a list of False When we were reading twice a m2o field where at least one result is null, the first call to name_get would set the value to False instead of None and then accepted by the filter 'isinstance(x, (int,long))' --- openerp/osv/fields.py | 2 +- openerp/osv/orm.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/openerp/osv/fields.py b/openerp/osv/fields.py index 18aa3aad8c2..49421365852 100644 --- a/openerp/osv/fields.py +++ b/openerp/osv/fields.py @@ -464,7 +464,7 @@ class many2one(_column): # we use uid=1 because the visibility of a many2one field value (just id and name) # must be the access right of the parent form and not the linked object itself. records = dict(obj.name_get(cr, SUPERUSER_ID, - list(set([x for x in res.values() if isinstance(x, (int,long))])), + list(set([x for x in res.values() if x and isinstance(x, (int,long))])), context=context)) for id in res: if res[id] in records: diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 6e91ba46721..1dbac53511f 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -3694,6 +3694,8 @@ class BaseModel(object): return [] if fields_to_read is None: fields_to_read = self._columns.keys() + else: + fields_to_read = list(set(fields_to_read)) # all inherited fields + all non inherited fields for which the attribute whose name is in load is True fields_pre = [f for f in fields_to_read if From e95545dcf020982604214ea44217ce5cda5d7185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 12 Jun 2014 17:32:32 +0200 Subject: [PATCH 08/44] [FIX] hr: typo in a field definition --- 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 0b1da11dd18..dbb20cc8b76 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -196,7 +196,7 @@ class hr_employee(osv.osv): "resized as a 128x128px image, with aspect ratio preserved. "\ "Use this field in form views or some kanban views."), 'image_small': fields.function(_get_image, fnct_inv=_set_image, - string="Smal-sized photo", type="binary", multi="_get_image", + string="Small-sized photo", type="binary", multi="_get_image", store = { 'hr.employee': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10), }, From 28ff7e38b909a7b020c51168b2ee1c4a9230667a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 12 Jun 2014 17:35:41 +0200 Subject: [PATCH 09/44] [FIX] portal: typos in portal wall actions. --- addons/portal/portal_data.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/portal/portal_data.xml b/addons/portal/portal_data.xml index 5c7fa14ce2a..ebaaa3f8424 100644 --- a/addons/portal/portal_data.xml +++ b/addons/portal/portal_data.xml @@ -39,7 +39,7 @@ }"/>

- Youd don't have unread company's news. + You don't have unread company's news.

@@ -71,7 +71,7 @@ }"/>

- Youd don't have unread job offers. + You don't have unread job offers.

From 4a508885ac043b25465aa5741955082aa66ce949 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 12 Jun 2014 20:03:50 +0200 Subject: [PATCH 10/44] [FIX] web: view_list_editable, on add an item, focus on the first cell of new row Before, the focus was set on the first row, and, thererefore, if the list was enough long, it jumped out and the actual new row was hidden --- .../web/static/src/js/view_list_editable.js | 40 +++---------------- 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js index c4aac5565ab..b97aef19815 100644 --- a/addons/web/static/src/js/view_list_editable.js +++ b/addons/web/static/src/js/view_list_editable.js @@ -127,15 +127,7 @@ openerp.web.list_editable = function (instance) { if (this.editable()) { this.$el.find('table:first').show(); this.$el.find('.oe_view_nocontent').remove(); - this.start_edition().then(function(){ - var fields = self.editor.form.fields; - self.editor.form.fields_order.some(function(field){ - if (fields[field].$el.is(':visible')){ - fields[field].$el.find("input").select(); - return true; - } - }); - }); + this.start_edition(); } else { this._super(); } @@ -240,6 +232,7 @@ openerp.web.list_editable = function (instance) { return this.ensure_saved().then(function () { var $recordRow = self.groups.get_row_for(record); var cells = self.get_cells_for($recordRow); + var fields = {}; self.fields_for_resize.splice(0, self.fields_for_resize.length); return self.with_event('edit', { record: record.attributes, @@ -253,10 +246,13 @@ openerp.web.list_editable = function (instance) { // FIXME: need better way to get the field back from bubbling (delegated) DOM events somehow field.$el.attr('data-fieldname', field_name); + fields[field_name] = field; self.fields_for_resize.push({field: field, cell: cell}); }, options).then(function () { $recordRow.addClass('oe_edition'); self.resize_fields(); + var focus_field = options && options.focus_field ? options.focus_field : (self.visible_columns.length ? self.visible_columns[0].name : undefined); + if (focus_field) fields[focus_field].$el.find('input').select(); return record.attributes; }); }).fail(function () { @@ -750,31 +746,6 @@ openerp.web.list_editable = function (instance) { throw new Error("is_editing's state filter must be either `new` or" + " `edit` if provided"); }, - _focus_setup: function (focus_field) { - var form = this.form; - - var field; - // If a field to focus was specified - if (focus_field - // Is actually in the form - && (field = form.fields[focus_field]) - // And is visible - && field.$el.is(':visible')) { - // focus it - field.focus(); - return; - } - - _(form.fields_order).detect(function (name) { - // look for first visible field in fields_order, focus it - var field = form.fields[name]; - if (!field.$el.is(':visible')) { - return false; - } - // Stop as soon as a field got focused - return field.focus() !== false; - }); - }, edit: function (record, configureField, options) { // TODO: specify sequence of edit calls var self = this; @@ -789,7 +760,6 @@ openerp.web.list_editable = function (instance) { _(form.fields).each(function (field, name) { configureField(name, field); }); - self._focus_setup(options && options.focus_field); return form; }); }, From 4e0559ef97dcb3422223b5a68ca8cbf9d8de79ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 12 Jun 2014 17:50:19 +0200 Subject: [PATCH 11/44] [FIX] hr_holidays: display float for leaves remaining / leaves taken in holiday type name get --- addons/hr_holidays/hr_holidays.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 07d4995998a..6a55403e960 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -104,7 +104,7 @@ class hr_holidays_status(osv.osv): for record in self.browse(cr, uid, ids, context=context): name = record.name if not record.limit: - name = name + (' (%d/%d)' % (record.leaves_taken or 0.0, record.max_leaves or 0.0)) + name = name + (' (%g/%g)' % (record.leaves_taken or 0.0, record.max_leaves or 0.0)) res.append((record.id, name)) return res From f9fc9fdf1c1ac429d2a1d217b3e3b0689e285248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 13 Jun 2014 09:07:28 +0200 Subject: [PATCH 12/44] [FIX] hr: working and home adresses should not be customers by default, only 'normal' adresses. --- addons/hr/hr_view.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index 3e79c0ca7d6..0d90d5d4dc7 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -35,7 +35,9 @@ - + @@ -64,7 +66,9 @@ - + From 2f43cf041de34b23f15974d09d9cb2b7b515fcc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 13 Jun 2014 09:25:48 +0200 Subject: [PATCH 13/44] [FIX] hr_holidays: date_from, date_to required in form view only for leave requests, not for allocation requests --- addons/hr_holidays/hr_holidays_view.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml index c39adcb3182..7c5db338bdb 100644 --- a/addons/hr_holidays/hr_holidays_view.xml +++ b/addons/hr_holidays/hr_holidays_view.xml @@ -63,13 +63,16 @@ +