Remove infinite loop in screen new for issue103
This commit is contained in:
1 parent
41f42e8650
commit
eaea0e4b28
1 file changed
+5
-1
@@ -342,8 +342,12 @@ class Screen(SignalEvent):
|
||||
and not (hasattr(self.current_view.widget_tree, 'editable') \
|
||||
and self.current_view.widget_tree.editable)) \
|
||||
or self.current_view.view_type == 'graph'):
|
||||
while self.current_view.view_type != 'form':
|
||||
for i in range(len(self.views)):
|
||||
self.switch_view()
|
||||
if self.current_view.view_type == 'form':
|
||||
break
|
||||
if self.current_view.view_type != 'form':
|
||||
return None
|
||||
ctx = self.context.copy()
|
||||
ctx.update(context)
|
||||
model = self.models.model_new(default, self.domain, ctx)
|
||||
|
||||
Reference in new issue
Block a user