From 21602f92a107ba1ea585354044c65ee140225d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 7 Feb 2014 13:32:49 +0100 Subject: [PATCH] [FIX] website: server action: compute website_url only for published code actions bzr revid: tde@openerp.com-20140207123249-yfql78xurblyamze --- addons/website/models/ir_actions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/website/models/ir_actions.py b/addons/website/models/ir_actions.py index 361191d6835..f6d98bf3632 100644 --- a/addons/website/models/ir_actions.py +++ b/addons/website/models/ir_actions.py @@ -23,7 +23,8 @@ class actions_server(osv.Model): def _get_website_url(self, cr, uid, ids, name, args, context=None): res = dict.fromkeys(ids, False) for action in self.browse(cr, uid, ids, context=context): - res[action.id] = self._compute_website_url(cr, uid, action.id, action.website_path, action.xml_id, context=context) + if action.state == 'code' and action.website_published: + res[action.id] = self._compute_website_url(cr, uid, action.id, action.website_path, action.xml_id, context=context) return res _columns = {