diff --git a/addons/pad/web/controllers.py b/addons/pad/web/controllers.py index faa5d0ad54b..1553d721303 100644 --- a/addons/pad/web/controllers.py +++ b/addons/pad/web/controllers.py @@ -30,5 +30,6 @@ class Piratepad(openerp.controllers.SecuredController): attachment_id = rpc.RPCProxy('ir.attachment').create({ 'name': pad_name, 'url': pad_link, + 'type': 'url' }, ctx) return {'id': attachment_id, 'name': pad_name, 'url': pad_link} diff --git a/addons/share/__openerp__.py b/addons/share/__openerp__.py index 2aae435090e..ff380c25d82 100644 --- a/addons/share/__openerp__.py +++ b/addons/share/__openerp__.py @@ -22,7 +22,7 @@ { "name" : "Sharing Tools", - "version" : "1.1", + "version" : "1.2", "depends" : ["base"], "author" : "OpenERP SA", "category": 'Generic Modules', diff --git a/addons/share/web/controllers.py b/addons/share/web/controllers.py index de44d0ecac3..b64d86c8c65 100644 --- a/addons/share/web/controllers.py +++ b/addons/share/web/controllers.py @@ -13,18 +13,15 @@ class ShareWizardController(openerp.controllers.SecuredController): _cp_path = "/share" @expose() - def index(self, domain, search_domain, context, name): + def index(self, domain, search_domain, context, view_id): context = ast.literal_eval(context) - view_name = context.get('_terp_view_name') or name - if not view_name: return - action_id = rpc.RPCProxy('ir.actions.actions').search( - [('name','=',view_name)], 0, 0, 0, context) - if not action_id: return + action_id = rpc.RPCProxy('ir.actions.act_window').search( + [('view_id','=',int(view_id))], context=context) + if not action_id: return "" domain = ast.literal_eval(domain) - search_domain = ast.literal_eval(search_domain) - domain.extend(search_domain) + domain.extend(ast.literal_eval(search_domain)) action_id = action_id[0] share_model = 'share.wizard' diff --git a/addons/share/web/editors.py b/addons/share/web/editors.py index d156d40c6b3..28e7747083b 100644 --- a/addons/share/web/editors.py +++ b/addons/share/web/editors.py @@ -26,7 +26,7 @@ class ShareActionEditor(openobject.templating.TemplateEditor): openobject.http.getURL('/share', { context: jQuery("#_terp_context").val(), domain: jQuery("#_terp_domain").val(), - name: jQuery("#_terp_string").val(), + view_id: jQuery("#_terp_view_id").val(), search_domain: jQuery("#_terp_search_domain").val(), })); });