diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 8f7c5d4f70d..a7a5625afe9 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -109,13 +109,11 @@ def serialize_exception(f): return wrap def redirect_with_hash(url, code=303): - if request.httprequest.user_agent.browser in ('msie', 'safari'): - # Most IE and Safari versions decided not to preserve location.hash upon - # redirect. And even if IE10 pretends to support it, it still fails - # inexplicably in case of multiple redirects (and we do have some). - # See extensive test page at http://greenbytes.de/tech/tc/httpredirects/ - return "
" % url - return werkzeug.utils.redirect(url, code) + # Most IE and Safari versions decided not to preserve location.hash upon + # redirect. And even if IE10 pretends to support it, it still fails + # inexplicably in case of multiple redirects (and we do have some). + # See extensive test page at http://greenbytes.de/tech/tc/httpredirects/ + return "" % url def module_topological_sort(modules): """ Return a list of module names sorted so that their dependencies of the diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 010585ee4a0..0cfc956cd73 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -659,6 +659,10 @@ display: block; color: gray; } +.openerp .ui-tabs .oe_notebook.ui-tabs-nav li.ui-tabs-active { + border-bottom: none; + padding-bottom: 1px; +} .openerp .oe_notebook > li.ui-tabs-active > a { color: #4c4c4c; } @@ -2890,6 +2894,9 @@ .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_datetime input.oe_datepicker_master, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_date input.oe_datepicker_master { width: 100% !important; } +.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_reference { + display: table; +} .openerp .oe_list_group_name { white-space: nowrap; } diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index e9a51370192..2d5eb317e93 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -595,6 +595,9 @@ $sheet-padding: 16px text-decoration: none background-color: #eee border-color: #eee #eee #ddd + .ui-tabs .oe_notebook.ui-tabs-nav li.ui-tabs-active + border-bottom: none + padding-bottom: 1px .oe_notebook > li.ui-state-active > a, .oe_notebook > li.ui-state-active > a:hover background-color: #ffffff border: 1px solid #ddd @@ -2304,6 +2307,8 @@ $sheet-padding: 16px &.oe_form_field_datetime,&.oe_form_field_date input.oe_datepicker_master width: 100% !important + &.oe_form_field_reference + display: table .oe_list_group_name white-space: nowrap // }}} diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 31293dab1a6..4ac351707d0 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -868,7 +868,7 @@ instance.web.client_actions.add("history_back", "instance.web.HistoryBack"); */ instance.web.Home = function(parent, action) { var url = '/' + (window.location.search || ''); - instance.web.redirect(url, action.params && action.params.wait); + instance.web.redirect(url, action && action.params && action.params.wait); }; instance.web.client_actions.add("home", "instance.web.Home"); diff --git a/addons/web/static/src/js/data.js b/addons/web/static/src/js/data.js index 984ded1fd5e..10ca5d74bd9 100644 --- a/addons/web/static/src/js/data.js +++ b/addons/web/static/src/js/data.js @@ -939,6 +939,15 @@ instance.web.BufferedDataSet = instance.web.DataSetStatic.extend({ * @param {Object} id record to remove from the BDS's cache */ evict_record: function (id) { + // Don't evict records which haven't yet been saved: there is no more + // recent data on the server (and there potentially isn't any data), + // and this breaks the assumptions of other methods (that the data + // for new and altered records is both in the cache and in the to_write + // or to_create collection) + if (_(this.to_create.concat(this.to_write)).find(function (record) { + return record.id === id; })) { + return; + } for(var i=0, len=this.cache.length; i