Prevent to create new readonly model

This commit is contained in:
Cédric Krier committed 2008-11-06 00:03:04 +01:00
1 parent 5e1b5392db
commit 16d3edab51
1 file changed
+2
@@ -353,6 +353,8 @@ class Screen(SignalEvent):
return False
def new(self, default=True, context=None):
if self.models.readonly:
return
if context is None:
context = {}
if self.current_view and ((self.current_view.view_type == 'tree' \