From 84ec9198e28d4bf284a029b8d18b56ecf00f3e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 21 Dec 2009 11:57:42 +0100 Subject: [PATCH] Use root user for create/write ir.translation to bypass the model access --- trytond/ir/translation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/trytond/ir/translation.py b/trytond/ir/translation.py index 72802c8ad0..0bff641279 100644 --- a/trytond/ir/translation.py +++ b/trytond/ir/translation.py @@ -188,7 +188,7 @@ class Translation(ModelSQL, ModelView, Cacheable): ('name', '=', name), ]) if not ids2: - self.create(cursor, user, { + self.create(cursor, 0, { 'name': name, 'lang': lang, 'type': ttype, @@ -197,7 +197,7 @@ class Translation(ModelSQL, ModelView, Cacheable): 'fuzzy': False, }) else: - self.write(cursor, user, ids, { + self.write(cursor, 0, ids, { 'src': record[field_name], 'value': value, 'fuzzy': False, @@ -212,7 +212,7 @@ class Translation(ModelSQL, ModelView, Cacheable): ('res_id', '=', record.id), ]) if not ids2: - self.create(cursor, user, { + self.create(cursor, 0, { 'name': name, 'lang': lang, 'type': ttype, @@ -222,7 +222,7 @@ class Translation(ModelSQL, ModelView, Cacheable): 'fuzzy': False, }) else: - self.write(cursor, user, ids2, { + self.write(cursor, 0, ids2, { 'value': value, 'src': record[field_name], 'fuzzy': False,