Add domain for parent of collection

This commit is contained in:
Cédric Krier committed 2008-07-19 22:56:32 +02:00
1 parent d3c0f14a7e
commit 986d368cd7
1 file changed
+1 -1
+1 -1
View File
@@ -16,7 +16,7 @@ class Collection(OSV):
_description = __doc__
name = fields.Char('Name', size=128, required=True, select=1)
parent = fields.Many2One('webdav.collection', 'Parent',
ondelete='restrict')
ondelete='restrict', domain=[('model', '=', False)])
childs = fields.One2Many('webdav.collection', 'parent', 'Childs')
model = fields.Many2One('ir.model', 'Model')
domain = fields.Char('Domain', size=250)