[FIX] Temporary fix until un-webclientization of the editorbar
bzr revid: fme@openerp.com-20130805082638-62mrzilwcu7wapd5
This commit is contained in:
@@ -1,4 +1,17 @@
|
||||
openerp.website = function(instance) {
|
||||
|
||||
instance.web.ActionManager.include({
|
||||
// Temporary fix until un-webclientization of the editorbar
|
||||
ir_actions_client: function (action) {
|
||||
if (instance.web.client_actions.get_object(action.tag)) {
|
||||
return this._super.apply(this, arguments);
|
||||
} else {
|
||||
console.warn("Action '%s' not found in registry", action.tag);
|
||||
return $.when();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var _lt = instance.web._lt;
|
||||
var QWeb = instance.web.qweb;
|
||||
instance.website.EditorBar = instance.web.Widget.extend({
|
||||
|
||||
@@ -20,8 +20,9 @@ http.auth_methods['public'] = auth_method_public
|
||||
|
||||
class website(object):
|
||||
def render(self, template, add_values={}):
|
||||
script = "\n".join(['<script type="text/javascript" src="%s"></script>' % i for i in main.manifest_list('js', db=request.db)])
|
||||
css = "\n".join('<link rel="stylesheet" href="%s">' % i for i in main.manifest_list('css', db=request.db))
|
||||
debug = 'debug' in request.params
|
||||
script = "\n".join(['<script type="text/javascript" src="%s"></script>' % i for i in main.manifest_list('js', db=request.db, debug=debug)])
|
||||
css = "\n".join('<link rel="stylesheet" href="%s">' % i for i in main.manifest_list('css', db=request.db, debug=debug))
|
||||
_values = {
|
||||
'editable': request.uid != request.public_uid,
|
||||
'request': request,
|
||||
@@ -35,4 +36,4 @@ class website(object):
|
||||
}
|
||||
_values.update(add_values)
|
||||
return request.registry.get("ir.ui.view").render(request.cr, request.uid, template, _values)
|
||||
website = website()
|
||||
website = website()
|
||||
|
||||
Reference in New Issue
Block a user