[MERGE] merge from trunk into local branch
bzr revid: ged@openerp.com-20140210082755-qz2i5six2ij9w2tj
This commit is contained in:
commit
e5f97580d3
|
@ -133,6 +133,20 @@ def ensure_db(redirect='/web/database/selector'):
|
|||
if db and db not in http.db_filter([db]):
|
||||
db = None
|
||||
|
||||
if db and not request.session.db:
|
||||
# User asked a specific database on a new session.
|
||||
# That mean the nodb router has been used to find the route
|
||||
# Depending on installed module in the database, the rendering of the page
|
||||
# may depend on data injected by the database route dispatcher.
|
||||
# Thus, we redirect the user to the same page but with the session cookie set.
|
||||
# This will force using the database route dispatcher...
|
||||
r = request.httprequest
|
||||
response = werkzeug.utils.redirect(r.url, 302)
|
||||
request.session.db = db
|
||||
response = r.app.get_response(r, response, explicit_session=False)
|
||||
werkzeug.exceptions.abort(response)
|
||||
return
|
||||
|
||||
# if db not provided, use the session one
|
||||
if not db:
|
||||
db = request.session.db
|
||||
|
|
|
@ -492,11 +492,7 @@ openerp.web_calendar = function(instance) {
|
|||
all_day = this.all_day ? evt[this.all_day] : false,
|
||||
res_computed_text = '',
|
||||
the_title = '',
|
||||
attendees = [];
|
||||
|
||||
if (this.date_stop && this.fields[this.date_stop].type == 'date') {
|
||||
date_stop.addDay(1);
|
||||
}
|
||||
attendees = [];
|
||||
|
||||
if (this.info_fields) {
|
||||
var temp_ret = {};
|
||||
|
|
Loading…
Reference in New Issue