From ac212e2758ce82c625b31fa6e1ae90d4113f42b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 8 Aug 2014 09:43:43 +0200 Subject: [PATCH] [FIX] ir_actions in website: allow to compute website_path even when creating a new server action (avoid crash then) --- addons/website/models/ir_actions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/models/ir_actions.py b/addons/website/models/ir_actions.py index 1b469adfc05..f186c421b9f 100644 --- a/addons/website/models/ir_actions.py +++ b/addons/website/models/ir_actions.py @@ -44,7 +44,7 @@ class actions_server(osv.Model): def on_change_website_path(self, cr, uid, ids, website_path, xml_id, context=None): values = { - 'website_url': self._compute_website_url(cr, uid, ids[0], website_path, xml_id, context=context) + 'website_url': self._compute_website_url(cr, uid, ids and ids[0] or None, website_path, xml_id, context=context) } return {'value': values}