From 0cecdac970f884fcd2d65a1dea7880b27358fb51 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 21 Mar 2013 13:49:52 +0100 Subject: [PATCH 01/37] [IMP] view_form: statusbar with folded selection bzr revid: chm@openerp.com-20130321124952-kwexraafd2681isg --- addons/web/static/src/css/base.css | 49 +++++++++++++++++++++------ addons/web/static/src/css/base.sass | 45 ++++++++++++------------ addons/web/static/src/js/view_form.js | 47 +++++++++++++------------ addons/web/static/src/xml/base.xml | 14 +++++++- 4 files changed, 99 insertions(+), 56 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index be0bb19748c..ed32cbdbeaf 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2158,6 +2158,7 @@ } .openerp .oe_form header { position: relative; + z-index: 1; border-bottom: 1px solid #cacaca; padding-left: 2px; background-color: #ededed; @@ -2630,17 +2631,17 @@ background-image: -o-linear-gradient(top, #fcfcfc, #dedede); background-image: linear-gradient(to bottom, #fcfcfc, #dedede); } -.openerp ul.oe_form_status li:first-child .label, .openerp ul.oe_form_status_clickable li:first-child .label { +.openerp ul.oe_form_status li:first-child .label, .openerp ul.oe_form_status_clickable li:first-child > .label { border-left: 1px solid #cacaca; padding-left: 14px; } .openerp ul.oe_form_status li:last-child, .openerp ul.oe_form_status_clickable li:last-child { border-right: 1px solid #cacaca; } -.openerp ul.oe_form_status li:last-child .label, .openerp ul.oe_form_status_clickable li:last-child .label { +.openerp ul.oe_form_status li:last-child .label, .openerp ul.oe_form_status_clickable li:last-child > .label { padding-right: 14px; } -.openerp ul.oe_form_status li:last-child .arrow, .openerp ul.oe_form_status_clickable li:last-child .arrow { +.openerp ul.oe_form_status li:last-child .arrow, .openerp ul.oe_form_status_clickable li:last-child > .arrow { display: none; } .openerp ul.oe_form_status li .label, .openerp ul.oe_form_status_clickable li .label { @@ -2690,18 +2691,18 @@ background-image: -o-linear-gradient(top, #729fcf, #3465a4); background-image: linear-gradient(to bottom, #729fcf, #3465a4); } -.openerp ul.oe_form_status li.oe_active .arrow span, .openerp ul.oe_form_status_clickable li.oe_active .arrow span { +.openerp ul.oe_form_status li.oe_active .arrow span, .openerp ul.oe_form_status_clickable li.oe_active > .arrow span { background-color: #3465a4; background: -moz-linear-gradient(135deg, #3465a4, #729fcf); background: -o-linear-gradient(135deg, #729fcf, #3465a4); background: -webkit-gradient(linear, left top, right bottom, from(#729fcf), to(#3465a4)); background: -ms-linear-gradient(top, #729fcf, #3465a4); } -.openerp ul.oe_form_status li.oe_active .label, .openerp ul.oe_form_status_clickable li.oe_active .label { +.openerp ul.oe_form_status li.oe_active .label, .openerp ul.oe_form_status_clickable li.oe_active > .label { color: white; text-shadow: 0 1px 1px #729fcf, 0 -1px 1px #3465a4; } -.openerp ul.oe_form_status_clickable li { +.openerp ul.oe_form_status_clickable > li { cursor: pointer; } .openerp ul.oe_form_status_clickable li:hover { @@ -2713,10 +2714,10 @@ background-image: -o-linear-gradient(top, #e8e8e8, #cacaca); background-image: linear-gradient(to bottom, #e8e8e8, #cacaca); } -.openerp ul.oe_form_status_clickable li:hover .label { +.openerp ul.oe_form_status_clickable li:hover > .label { text-shadow: 0 -1px 1px #fcfcfc, 0 1px 1px #dedede; } -.openerp ul.oe_form_status_clickable li:hover .arrow span { +.openerp ul.oe_form_status_clickable li:hover > .arrow span { background-color: #d9d9d9; background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#cacaca)); background-image: -webkit-linear-gradient(top, #e8e8e8, #cacaca); @@ -2725,7 +2726,7 @@ background-image: -o-linear-gradient(top, #e8e8e8, #cacaca); background-image: linear-gradient(to bottom, #e8e8e8, #cacaca); } -.openerp ul.oe_form_status_clickable li .label { +.openerp ul.oe_form_status_clickable li > .label { color: #7c7bad; } .openerp ul.oe_form_status_clickable li.oe_active:hover { @@ -2737,16 +2738,42 @@ background-image: -o-linear-gradient(top, #4c85c2, #284d7d); background-image: linear-gradient(to bottom, #4c85c2, #284d7d); } -.openerp ul.oe_form_status_clickable li.oe_active:hover .label { +.openerp ul.oe_form_status_clickable li.oe_active:hover > .label { text-shadow: 0 -1px 1px #729fcf, 0 1px 1px #3465a4; } -.openerp ul.oe_form_status_clickable li.oe_active:hover .arrow span { +.openerp ul.oe_form_status_clickable li.oe_active:hover > .arrow span { background-color: #284d7d; background: -moz-linear-gradient(135deg, #284d7d, #4c85c2); background: -o-linear-gradient(135deg, #4c85c2, #284d7d); background: -webkit-gradient(linear, left top, right bottom, from(#4c85c2), to(#284d7d)); background: -ms-linear-gradient(top, #4c85c2, #284d7d); } +.openerp ul.oe_form_field_status li.oe_folded .label{ + padding-bottom: 8px; +} +.openerp ul.oe_form_field_status li.oe_folded ul{ + position: absolute; + border-top: 1px solid #cacaca; + float: none; + top: 30px; + right: 0; + display: none; +} +.openerp ul.oe_form_field_status li.oe_folded:hover ul{ + display: block; +} +.openerp ul.oe_form_field_status li.oe_folded ul li{ + margin: 0; + border-left: 1px solid #cacaca; + display: block; +} +.openerp ul.oe_form_field_status li.oe_folded ul li .label{ + border: 0; + padding-left: 24px; +} +.openerp ul.oe_form_field_status li.oe_folded ul li:last-child { + border-bottom: 1px solid #cacaca; +} .openerp .oe_form .oe_form_field_one2many > .oe_view_manager .oe_list_pager_single_page { display: none; } diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index e2c047f11e1..90d576eb6a1 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -1707,6 +1707,7 @@ $sheet-padding: 16px // FormView.header {{{ .oe_form header position: relative + z-index: 1 border-bottom: 1px solid #cacaca padding-left: 2px @include vertical-gradient(#fcfcfc, #dedede) @@ -2092,16 +2093,16 @@ $sheet-padding: 16px margin: 0 -18px 0 0 padding: 0 @include vertical-gradient(#fcfcfc, #dedede) - &:first-child .label + &:first-child > .label border-left: 1px solid #cacaca padding-left: 14px &:last-child border-right: 1px solid #cacaca - .label + > .label padding-right: 14px - .arrow + > .arrow display: none - .label + > .label color: #4c4c4c text-shadow: 0 1px 1px #fcfcfc, 0 -1px 1px #dedede padding: 7px @@ -2109,7 +2110,7 @@ $sheet-padding: 16px padding-left: 24px margin: 0 position: relative - .arrow + > .arrow width: 17px display: inline-block vertical-align: top @@ -2128,9 +2129,9 @@ $sheet-padding: 16px @include transform(rotate(45deg)) li.oe_active @include vertical-gradient(#729fcf, #3465a4) - .arrow span + > .arrow span @include skew-gradient(#729fcf, #3465a4) - .label + > .label color: white text-shadow: 0 1px 1px #729fcf, 0 -1px 1px #3465a4 ul.oe_form_status_clickable @@ -2138,18 +2139,18 @@ $sheet-padding: 16px cursor: pointer &:hover @include vertical-gradient(darken(#fcfcfc, 8%), darken(#dedede, 8%)) - .label + > .label text-shadow: 0 -1px 1px #fcfcfc, 0 1px 1px #dedede - .arrow span + > .arrow span @include vertical-gradient(darken(#fcfcfc, 8%), darken(#dedede, 8%)) - .label + > .label color: $link-color li.oe_active &:hover @include vertical-gradient(darken(#729fcf, 10%), darken(#3465a4, 10%)) - .label + > .label text-shadow: 0 -1px 1px #729fcf, 0 1px 1px #3465a4 - .arrow span + > .arrow span @include skew-gradient(darken(#729fcf, 10%), darken(#3465a4, 10%)) // }}} // FormView.one2many {{{ @@ -2609,26 +2610,26 @@ div.ui-widget-overlay &:last-child overflow: hidden border-right: 1px solid #cacaca - .label + > .label padding-right: 14px border-right: none - .arrow + > .arrow display: inline-block opacity: 0 filter: alpha(opacity = 0) border: none width: 0 border-right: none - .label - border-bottom: 1px solid #cacaca - background: transparent - .arrow - span - background-color: #fefefe !important + > .label + border-bottom: 1px solid #cacaca + background: transparent + > .arrow + span + background-color: #fefefe !important li.oe_active - .label + > .label border-bottom: 1px solid #729fcf - .arrow span + > .arrow span background-color: #729fcf !important // jquery ui for ie diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index b057616b6ab..a6ed212fbdc 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -5263,8 +5263,8 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({ this.options.clickable = this.options.clickable || (this.node.attrs || {}).clickable || false; this.options.visible = this.options.visible || (this.node.attrs || {}).statusbar_visible || false; this.set({value: false}); - this.selection = []; - this.set("selection", []); + this.selection = {'unfolded': [], 'folded': []}; + this.set("selection", {'unfolded': [], 'folded': []}); this.selection_dm = new instance.web.DropMisordered(); }, start: function() { @@ -5278,7 +5278,7 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({ }); this.get_selection(); if (this.options.clickable) { - this.$el.on('click','li',this.on_click_stage); + this.$el.on('click','li:not(.oe_folded)',this.on_click_stage); } if (this.$el.parent().is('header')) { this.$el.after('
'); @@ -5293,7 +5293,10 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({ }, render_value: function() { var self = this; - var content = QWeb.render("FieldStatus.content", {widget: self}); + var content = QWeb.render("FieldStatus.content", { + 'widget': self, + 'value_folded': _.find(self.selection.folded, function(i){return i[0] === self.get('value')}) + }); self.$el.html(content); var colors = JSON.parse((self.node.attrs || {}).statusbar_colors || "{}"); var color = colors[self.get('value')]; @@ -5303,15 +5306,8 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({ }, calc_domain: function() { var d = instance.web.pyeval.eval('domain', this.build_domain()); - var domain = []; //if there is no domain defined, fetch all the records - - if (d.length) { - domain = ['|',['id', '=', this.get('value')]].concat(d); - } - - if (! _.isEqual(domain, this.get("evaluated_selection_domain"))) { - this.set("evaluated_selection_domain", domain); - } + this.set("evaluated_selection_domain", ['&', ['fold', '=', false], '|', ['id', '=', this.get('value')]].concat(d)); + this.set("evaluated_selection_domain_folded", ['&', ['fold', '!=', false], '|', ['id', '=', this.get('value')]].concat(d)); }, /** Get the selection and render it * selection: [[identifier, value_to_display], ...] @@ -5320,18 +5316,24 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({ */ get_selection: function() { var self = this; - var selection = []; + var selection_unfolded = []; + var selection_folded = []; var calculation = _.bind(function() { if (this.field.type == "many2one") { - var domain = []; - var ds = new instance.web.DataSetSearch(this, this.field.relation, - self.build_context(), this.get("evaluated_selection_domain")); - return ds.read_slice(['name'], {}).then(function (records) { - for(var i = 0; i < records.length; i++) { - selection.push([records[i].id, records[i].name]); - } - }); + var ds_unfold = new instance.web.DataSetSearch(self, self.field.relation, self.build_context(), this.get("evaluated_selection_domain")) + .read_slice(['name'], {}).then(function (records) { + _.each(records, function (record) { + selection_unfolded.push([record.id, record.name]); + }); + }); + var ds_fold = new instance.web.DataSetSearch(self, self.field.relation, self.build_context(), this.get("evaluated_selection_domain_folded")) + .read_slice(['name'], {}).then(function (records) { + _.each(records, function (record) { + selection_folded.push([record.id, record.name]); + }); + }); + return $.when(ds_unfold, ds_fold); } else { // For field type selection filter values according to // statusbar_visible attribute of the field. For example: @@ -5347,6 +5349,7 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({ } }, this); this.selection_dm.add(calculation()).then(function () { + var selection = {'unfolded': selection_unfolded, 'folded': selection_folded}; if (! _.isEqual(selection, self.get("selection"))) { self.set("selection", selection); } diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 5ac7e5c3ef6..623fdc2de53 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1190,13 +1190,25 @@ +
  • diff --git a/addons/sale_stock/stock_view.xml b/addons/sale_stock/stock_view.xml index d06526902fd..0f5b9c4f1e6 100644 --- a/addons/sale_stock/stock_view.xml +++ b/addons/sale_stock/stock_view.xml @@ -1,16 +1,6 @@ - - stock.picking.form - stock.picking - - - - - - - stock.move.form @@ -51,7 +41,7 @@ Outgoing picking Inherited - stock.picking + stock.picking.out From 0f1d7c9e9e65c19fa33e4144e6fd079eec8be88f Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Thu, 28 Mar 2013 12:38:56 +0530 Subject: [PATCH 06/37] [IMP] improved code to fix visibility related issue bzr revid: tpa@tinyerp.com-20130328070856-ohmghoo3bj1comx9 --- addons/mail/static/src/css/mail.css | 1 + addons/web_shortcuts/static/src/css/web_shortcuts.css | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index 51306727a09..b4056ed320c 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -624,6 +624,7 @@ } .openerp .oe_followers .oe_partner { height: 32px; + margin-right: 8px; overflow: hidden; white-space: nowrap; } diff --git a/addons/web_shortcuts/static/src/css/web_shortcuts.css b/addons/web_shortcuts/static/src/css/web_shortcuts.css index 8424e146d06..73b2d449edc 100644 --- a/addons/web_shortcuts/static/src/css/web_shortcuts.css +++ b/addons/web_shortcuts/static/src/css/web_shortcuts.css @@ -54,4 +54,6 @@ border-left: none; padding-left: 0; } - +.openerp .oe_dropdown_menu > li > a:hover{ + overflow: visible; +} From 11ffa1be3bc41b79c3edb877164e6a7ed2912a81 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 28 Mar 2013 11:41:16 +0100 Subject: [PATCH 07/37] [IMP] view_form: statusbar: see the folded stage where i am bzr revid: chm@openerp.com-20130328104116-gn6ve3g2p4d496ss --- addons/web/static/src/js/view_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 4f5d2e1cc47..1e69df1e6d1 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -5323,7 +5323,7 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({ return new instance.web.DataSetSearch(self, self.field.relation, self.build_context(), this.get("evaluated_selection_domain")) .read_slice(['name', 'fold'], {}).then(function (records) { _.each(records, function (record) { - if (record.fold) { + if (record.fold && record.id != self.get('value')) { selection_folded.push([record.id, record.name]); } else { selection_unfolded.push([record.id, record.name]); From c4ef5d2f6cc801de0b5bf96b0a7b606506b001a0 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Fri, 29 Mar 2013 16:44:51 +0530 Subject: [PATCH 08/37] [IMP] improved css and view bzr revid: tpa@tinyerp.com-20130329111451-49ouiym81aeh1np4 --- addons/mail/static/src/css/mail.css | 1 + addons/sale_crm/sale_crm_view.xml | 2 +- addons/web_shortcuts/static/src/css/web_shortcuts.css | 7 ++++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index b4056ed320c..da2e5f1a3a0 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -627,6 +627,7 @@ margin-right: 8px; overflow: hidden; white-space: nowrap; + text-overflow: ellipsis; } .openerp .oe_followers .oe_partner img{ width: 32px; diff --git a/addons/sale_crm/sale_crm_view.xml b/addons/sale_crm/sale_crm_view.xml index 0b5fce2f5cd..81e6ee68076 100644 --- a/addons/sale_crm/sale_crm_view.xml +++ b/addons/sale_crm/sale_crm_view.xml @@ -106,7 +106,7 @@ - + diff --git a/addons/web_shortcuts/static/src/css/web_shortcuts.css b/addons/web_shortcuts/static/src/css/web_shortcuts.css index 73b2d449edc..5d4e34f53b9 100644 --- a/addons/web_shortcuts/static/src/css/web_shortcuts.css +++ b/addons/web_shortcuts/static/src/css/web_shortcuts.css @@ -54,6 +54,7 @@ border-left: none; padding-left: 0; } -.openerp .oe_dropdown_menu > li > a:hover{ - overflow: visible; -} +.oe_systray_shortcuts_items > li > a:hover { + overflow:visible; + white-space: normal; +} \ No newline at end of file From 4a21d05144afc0e7698c99483f7e44482650fcfb Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Fri, 12 Apr 2013 12:35:48 +0530 Subject: [PATCH 09/37] [IMP] hide Storage Location entire group in the inventory for products of type service & move company_id after sale price in information tab bzr revid: fka@tinyerp.com-20130412070548-3wh0mi5k32la17yk --- addons/stock/product_view.xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/addons/stock/product_view.xml b/addons/stock/product_view.xml index dc80c0f950a..6348858b80c 100644 --- a/addons/stock/product_view.xml +++ b/addons/stock/product_view.xml @@ -72,6 +72,9 @@