From fdfe102cc416c1fe70dd30de0aa61c947c1101d1 Mon Sep 17 00:00:00 2001 From: kbh Date: Mon, 3 Oct 2011 11:32:39 +0530 Subject: [PATCH 1/4] [FIX] change in listview for sidebar. bzr revid: kbh@bde-desktop-20111003060239-l7bwy55n8t9fkz66 --- addons/web/static/src/js/view_list.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 8a9deaab228..2a3170953c3 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -505,7 +505,11 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# do_select: function (ids, records) { this.$element.find('.oe-list-delete') .attr('disabled', !ids.length); - + if(ids.length > 0) { + this.sidebar.do_unfold(); + } else { + this.sidebar.do_fold(); + } if (!records.length) { this.compute_aggregates(); return; From 335c99fda4ee0bfda3ccfb74a69c196cd425ef12 Mon Sep 17 00:00:00 2001 From: kbh Date: Mon, 3 Oct 2011 12:48:07 +0530 Subject: [PATCH 2/4] [FIX] Minor change in issue of open sidebar on checked list record. lp bug: https://launchpad.net/bugs/856376 fixed bzr revid: kbh@bde-desktop-20111003071807-33zlrcc0vopiahoz --- addons/web/static/src/js/view_list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 2a3170953c3..c8d9bbe270e 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -505,7 +505,7 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# do_select: function (ids, records) { this.$element.find('.oe-list-delete') .attr('disabled', !ids.length); - if(ids.length > 0) { + if(ids.length) { this.sidebar.do_unfold(); } else { this.sidebar.do_fold(); From f4ffbd79f417c6445b630a5a33979321dba67cc0 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Mon, 3 Oct 2011 15:26:53 +0200 Subject: [PATCH 3/4] [IMP] field.m2m: better doc for auto-named m2m relationships bzr revid: odo@openerp.com-20111003132653-413c41exoj64q416 --- openerp/osv/fields.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openerp/osv/fields.py b/openerp/osv/fields.py index 0d60a1cbb95..9b437de86e4 100644 --- a/openerp/osv/fields.py +++ b/openerp/osv/fields.py @@ -495,6 +495,15 @@ class one2many(_column): class many2many(_column): """Encapsulates the logic of a many-to-many bidirectional relationship, handling the low-level details of the intermediary relationship table transparently. + A many-to-many relationship is always symmetrical, and can be declared and accessed + from either endpoint model. + If ``rel`` (relationship table name), ``id1`` (source foreign key column name) + or id2 (destination foreign key column name) are not specified, the system will + provide default values. This will by default only allow one single symmetrical + many-to-many relationship between the source and destination model. + For multiple many-to-many relationship between the same models and for + relationships where source and destination models are the same, ``rel``, ``id1`` + and ``id2`` should be specified explicitly. :param str obj: destination model :param str rel: optional name of the intermediary relationship table. If not specified, From e80894b77538739b0f2e0e672f9e077bb7d43cd1 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Mon, 3 Oct 2011 17:00:49 +0200 Subject: [PATCH 4/4] [FIX] Fixed error for sidebar-less embedded list views bzr revid: fme@openerp.com-20111003150049-hty30u42ozakevc8 --- addons/web/static/src/js/view_list.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index c8d9bbe270e..c78adf769bd 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -505,10 +505,12 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# do_select: function (ids, records) { this.$element.find('.oe-list-delete') .attr('disabled', !ids.length); - if(ids.length) { - this.sidebar.do_unfold(); - } else { - this.sidebar.do_fold(); + if (this.sidebar) { + if (ids.length) { + this.sidebar.do_unfold(); + } else { + this.sidebar.do_fold(); + } } if (!records.length) { this.compute_aggregates();