diff --git a/addons/web/common/http.py b/addons/web/common/http.py index 9c3664c8da0..6dc99f2c997 100644 --- a/addons/web/common/http.py +++ b/addons/web/common/http.py @@ -461,7 +461,7 @@ class Root(object): only used in case the list of databases is requested by the server, will be filtered by this pattern """ - def __init__(self, options, openerp_addons_namespace=True): + def __init__(self, options): self.config = options if not hasattr(self.config, 'connector'): @@ -474,7 +474,7 @@ class Root(object): self.httpsession_cookie = 'httpsessionid' self.addons = {} - static_dirs = self._load_addons(openerp_addons_namespace) + static_dirs = self._load_addons() if options.serve_static: app = werkzeug.wsgi.SharedDataMiddleware( self.dispatch, static_dirs) self.dispatch = DisableCacheMiddleware(app) @@ -520,7 +520,7 @@ class Root(object): return response(environ, start_response) - def _load_addons(self, openerp_addons_namespace=True): + def _load_addons(self): """ Loads all addons at the specified addons path, returns a mapping of static URLs to the corresponding directories @@ -535,7 +535,7 @@ class Root(object): manifest = ast.literal_eval(open(manifest_path).read()) manifest['addons_path'] = addons_path _logger.debug("Loading %s", module) - if openerp_addons_namespace: + if 'openerp.addons' in sys.modules: m = __import__('openerp.addons.' + module) else: m = __import__(module) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index dcb3fd958f4..b1c6348b2ad 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -502,6 +502,7 @@ -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); border: none; + margin-bottom: 10px; } .openerp .oe_avatar + div { margin-left: 5px; @@ -574,6 +575,9 @@ background: #7c7bad; color: #eeeeee; } +.openerp .oe_tags { + margin-bottom: 1px; +} .openerp .oe_tags.oe_inline { min-width: 250px; } @@ -2156,7 +2160,7 @@ .openerp .oe_form td.oe_form_group_cell_label label { line-height: 18px; display: block; - min-width: 160px; + min-width: 140px; } .openerp .oe_form td.oe_form_group_cell + .oe_form_group_cell { padding-left: 6px; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 43b8ace724b..1b6a1b3d766 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -422,6 +422,7 @@ $sheet-max-width: 860px @include radius(3px) @include box-shadow(0 1px 4px rgba(0, 0, 0, 0.4)) border: none + margin-bottom: 10px .oe_avatar + div margin-left: 5px .oe_image_small > img @@ -475,6 +476,7 @@ $sheet-max-width: 860px .text-core .text-wrap .text-dropdown .text-list .text-suggestion em font-style: italic text-decoration: none + margin-bottom: 1px // }}} // Tooltips {{{ &.oe_tooltip @@ -1650,7 +1652,7 @@ $sheet-max-width: 860px label line-height: 18px display: block - min-width: 160px + min-width: 140px td.oe_form_group_cell + .oe_form_group_cell padding-left: 6px .oe_form_group diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index db144f3976d..24584413fee 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2193,7 +2193,8 @@ instance.web.DateTimeWidget = instance.web.Widget.extend({ changeMonth: true, changeYear: true, showWeek: true, - showButtonPanel: true + showButtonPanel: true, + firstDay: Date.CultureInfo.firstDayOfWeek }); this.$el.find('img.oe_datepicker_trigger').click(function() { if (self.get("effective_readonly") || self.picker('widget').is(':visible')) { @@ -2384,13 +2385,6 @@ instance.web.form.FieldText = instance.web.form.AbstractField.extend(instance.we */ instance.web.form.FieldTextHtml = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin, { template: 'FieldTextHtml', - init: function() { - this._super.apply(this, arguments); - if (this.field.type !== 'html') { - throw new Error(_.str.sprintf( - _t("Error with field %s, it is not allowed to use the widget 'html' with any other field type than 'html'"), this.string)); - } - }, initialize_content: function() { var self = this; if (! this.get("effective_readonly")) { diff --git a/openerp-web b/openerp-web index 3340b95646e..7e536a99442 100755 --- a/openerp-web +++ b/openerp-web @@ -105,7 +105,7 @@ if __name__ == "__main__": else: logging.basicConfig(level=getattr(logging, options.log_level.upper())) - app = web.common.http.Root(options, openerp_addons_namespace=False) + app = web.common.http.Root(options) if options.proxy_mode: app = werkzeug.contrib.fixers.ProxyFix(app)