Return message id if pool does not have yet ir.message
When pool is initialized the ir.message may not yet be registered. issue8631 review262061002
This commit is contained in:
+4
-1
@@ -10,7 +10,10 @@ def gettext(message_id, *args, **variables):
|
||||
if not Transaction().database:
|
||||
return message_id
|
||||
pool = Pool()
|
||||
Message = pool.get('ir.message')
|
||||
try:
|
||||
Message = pool.get('ir.message')
|
||||
except KeyError:
|
||||
return message_id
|
||||
if not args:
|
||||
language = Transaction().language
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user