[FIX] ir_actions in website: allow to compute website_path even when creating a new...
authorThibault Delavallée <tde@openerp.com>
Fri, 8 Aug 2014 07:43:43 +0000 (09:43 +0200)
committerThibault Delavallée <tde@openerp.com>
Fri, 8 Aug 2014 09:43:28 +0000 (11:43 +0200)
addons/website/models/ir_actions.py

index 1b469ad..f186c42 100644 (file)
@@ -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}