From b6a2cfd8bf0d9930b15104d516f767b53ed56973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 1 Nov 2008 22:26:31 +0100 Subject: [PATCH] Fix translation of views by modules for issue491 --- trytond/ir/ui/view.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/trytond/ir/ui/view.py b/trytond/ir/ui/view.py index 7519aba7ac..1e48b096a7 100644 --- a/trytond/ir/ui/view.py +++ b/trytond/ir/ui/view.py @@ -89,6 +89,7 @@ class View(OSV): view_ids = self.search(cursor, 0, [ ('model', '=', view.model), ('id', '!=', view.id), + ('module', '=', view.module), ]) for view2 in self.browse(cursor, 0, view_ids): tree2 = etree.fromstring(view2.arch) @@ -129,9 +130,10 @@ class View(OSV): cursor.execute('DELETE FROM ir_translation ' \ 'WHERE name = %s ' \ 'AND type = %s ' \ + 'AND module = %s ' \ 'AND src NOT IN ' \ '(' + ','.join(['%s' for x in strings]) + ')', - (view.model, 'view') + tuple(strings)) + (view.model, 'view', view.module) + tuple(strings)) return True def delete(self, cursor, user, ids, context=None):