@@ -14,28 +14,23 @@ class DocumentPage(models.Model):
14
14
_order = 'name'
15
15
16
16
name = fields .Char ('Title' , required = True )
17
-
18
17
type = fields .Selection (
19
18
[('content' , 'Content' ), ('category' , 'Category' )],
20
19
'Type' ,
21
20
help = "Page type" ,
22
21
default = "content"
23
22
)
24
-
25
23
active = fields .Boolean (default = True )
26
-
27
24
parent_id = fields .Many2one (
28
25
'document.page' ,
29
26
'Category' ,
30
27
domain = [('type' , '=' , 'category' )]
31
28
)
32
-
33
29
child_ids = fields .One2many (
34
30
'document.page' ,
35
31
'parent_id' ,
36
32
'Children'
37
33
)
38
-
39
34
content = fields .Text (
40
35
"Content" ,
41
36
compute = '_compute_content' ,
@@ -65,37 +60,32 @@ class DocumentPage(models.Model):
65
60
help = "Template that will be used as a content template "
66
61
"for all new page of this category." ,
67
62
)
68
-
69
63
history_head = fields .Many2one (
70
64
'document.page.history' ,
71
65
'HEAD' ,
72
66
compute = '_compute_history_head' ,
73
67
store = True ,
74
68
auto_join = True ,
75
69
)
76
-
77
70
history_ids = fields .One2many (
78
71
'document.page.history' ,
79
72
'page_id' ,
80
73
'History' ,
81
74
order = 'create_date DESC' ,
82
75
readonly = True ,
83
76
)
84
-
85
77
menu_id = fields .Many2one (
86
78
'ir.ui.menu' ,
87
79
"Menu" ,
88
80
readonly = True ,
89
81
)
90
-
91
82
content_date = fields .Datetime (
92
83
'Last Contribution Date' ,
93
84
related = 'history_head.create_date' ,
94
85
store = True ,
95
86
index = True ,
96
87
readonly = True ,
97
88
)
98
-
99
89
content_uid = fields .Many2one (
100
90
'res.users' ,
101
91
'Last Contributor' ,
@@ -104,7 +94,6 @@ class DocumentPage(models.Model):
104
94
index = True ,
105
95
readonly = True ,
106
96
)
107
-
108
97
company_id = fields .Many2one (
109
98
'res.company' ,
110
99
'Company' ,
0 commit comments