From bc56bf47f3ba62d60e43ead2354144a6b63ee70d Mon Sep 17 00:00:00 2001 From: Bertrand Chenal Date: Wed, 10 Dec 2008 01:51:41 +0100 Subject: [PATCH] Fix cron messages: fallback to default langage if missing on the user --- trytond/ir/cron.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trytond/ir/cron.py b/trytond/ir/cron.py index 693c567fdd..a7f74ce1d4 100644 --- a/trytond/ir/cron.py +++ b/trytond/ir/cron.py @@ -126,7 +126,8 @@ class Cron(OSV): cursor, cron['user'], {'name': self.raise_user_error( cursor, 'request_title', raise_exception=False, - context={'language': req_user.language.code}), + context={'language': req_user.language and \ + req_user.language.code or "en_US"}), 'priority': '2', 'act_from': cron['user'], 'act_to': cron['request_user'],