merge from trunk

bzr revid: mit@openerp.com-20120903111231-gpw527k8dvht5u3k
This commit is contained in:
Minh Tran 2012-09-03 13:12:31 +02:00
commit 0e16327c34
5 changed files with 15 additions and 15 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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

View File

@ -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")) {

View File

@ -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)