From 4ff7ca6d6e6e5997b1128f396c5f450e1cdae426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 13 Jan 2025 19:28:18 +0100 Subject: [PATCH] Use None as default value for module of view Since 53fc70c2139f the module column of ir_ui_view has a foreign key constraint on ir_module table so the default value must be NULL to ignore the constraint when there is no module. Closes #13816 --- trytond/trytond/ir/ui/view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trytond/trytond/ir/ui/view.py b/trytond/trytond/ir/ui/view.py index 7c8cea8c4d..a53779d5dd 100644 --- a/trytond/trytond/ir/ui/view.py +++ b/trytond/trytond/ir/ui/view.py @@ -129,7 +129,7 @@ class View( @staticmethod def default_module(): - return Transaction().context.get('module') or '' + return Transaction().context.get('module') def get_basis(self, name): return not self.inherit or self.model != self.inherit.model