[FIX] fields: inherited fields get their attribute 'state' from their base field
[odoo/odoo.git] / addons / website_blog / views / website_blog_views.xml
1 <?xml version="1.0"?>
2 <openerp>
3     <data>
4         <menuitem name="Knowledge" id="knowledge.menu_document"/>
5         <menuitem name="Blog Posts" id="menu_wiki" parent="knowledge.menu_document" sequence="20" />
6
7         <!-- Blog views -->
8         <record model="ir.ui.view" id="view_blog_blog_list">
9             <field name="name">blog.blog.list</field>
10             <field name="model">blog.blog</field>
11             <field name="arch" type="xml">
12                 <tree string="Blogs">
13                     <field name="name"/>
14                 </tree>
15             </field>
16         </record>
17         <record model="ir.ui.view" id="view_blog_blog_form">
18             <field name="name">blog.blog.form</field>
19             <field name="model">blog.blog</field>
20             <field name="arch" type="xml">
21                 <form string="Blog">
22                     <sheet>
23                         <group>
24                             <field name="name"/>
25                             <field name="description"/>
26                         </group>
27                     </sheet>
28                     <div class="oe_chatter">
29                         <field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
30                         <field name="message_ids" widget="mail_thread" options='{"thread_level": 1}' placeholder="Send a message to the group"/>
31                     </div>
32                 </form>
33             </field>
34         </record>
35
36         <!-- page list view  -->
37         <record model="ir.ui.view" id="view_blog_post_list">
38             <field name="name">blog.post.list</field>
39             <field name="model">blog.post</field>
40             <field name="arch" type="xml">
41                 <tree string="Blog Posts">
42                     <field name="name"/>
43                     <field name="blog_id"/>
44                     <field name="create_uid" invisible="1"/>
45                     <field name="write_uid"/>
46                     <field name="write_date"/>
47                 </tree>
48             </field>
49         </record>
50         <!-- page form view  -->
51         <record model="ir.ui.view" id="view_blog_post_form">
52             <field name="name">blog.post.form</field>
53             <field name="model">blog.post</field>
54             <field name="arch" type="xml">
55                 <form string="Blog Post">
56                     <sheet>
57                         <group>
58                             <field name="name" placeholder="Name"/>
59                             <field name="tag_ids" widget="many2many_tags"/>
60                             <field name="subtitle" placeholder="Blog Subtitle"/>
61                         </group>
62                         <group>
63                             <field name="background_image"/>
64                             <field name="blog_id"/>
65                         </group>
66                         <group>
67                             <field name="visits"/>
68                             <field name="ranking" invisible="1"/>
69                         </group>
70                         <group string="Technical" groups="base.group_no_one">
71                             <field name="write_uid" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_document_user']}"/>
72                             <field name="write_date"/>
73                         </group>
74                     </sheet>
75                     <div class="oe_chatter">
76                         <field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
77                         <field name="message_ids" widget="mail_thread" options='{"thread_level": 1}' placeholder="Send a message to the group"/>
78                     </div>
79                 </form>
80             </field>
81         </record>
82         <!-- page search view  -->
83         <record model="ir.ui.view" id="view_blog_post_search">
84             <field name="name">blog.post.search</field>
85             <field name="model">blog.post</field>
86             <field name="arch" type="xml">
87                 <search string="Blog Post">
88                     <field name="name" string="Content" filter_domain="['|', ('name','ilike',self), ('content','ilike',self)]"/>
89                     <field name="write_uid"/>
90                     <field name="blog_id"/>
91                     <group expand="0" string="Group By">
92                         <filter string="Blog" domain="[]" context="{'group_by': 'blog_id'}"/>
93                         <filter string="Author" domain="[]" context="{'group_by': 'create_uid'}"/>
94                         <filter string="Last Contributor" domain="[]" context="{'group_by': 'write_uid'}"/>
95                     </group>
96                 </search>
97             </field>
98         </record>
99         <!-- page action -->
100         <record model="ir.actions.act_window" id="action_blog_post">
101             <field name="name">Blog Posts</field>
102             <field name="res_model">blog.post</field>
103             <field name="view_type">form</field>
104             <field name="view_mode">tree,form</field>
105             <field name="view_id" ref="view_blog_post_list"/>
106             <field name="search_view_id" ref="view_blog_post_search"/>
107             <field name="help" type="html">
108                 <p class="oe_view_nocontent_create">
109                     Click to create a new blog post.
110                 </p>
111             </field>
112         </record>
113         <menuitem id="menu_page" parent="menu_wiki" name="Blog Posts" action="action_blog_post" sequence="10"/>
114
115         <record model="ir.actions.act_window" id="action_blog_blog">
116             <field name="name">Blogs</field>
117             <field name="res_model">blog.blog</field>
118             <field name="view_type">form</field>
119             <field name="view_mode">tree,form</field>
120         </record>
121         <menuitem id="menu_blog" parent="menu_wiki" name="Blogs" action="action_blog_blog" sequence="20"/>
122
123         <!-- History Tree view -->
124         <record model="ir.ui.view" id="view_blog_history_tree">
125             <field name="name">blog.post.history.tree</field>
126             <field name="model">blog.post.history</field>
127             <field name="arch" type="xml">
128                 <tree string="Document History">
129                     <field name="create_date"/>
130                     <field name="create_uid"/>
131                     <field name="post_id"/>
132                 </tree>
133             </field>
134         </record>
135         <!-- History Form view  -->
136         <record model="ir.ui.view" id="view_blog_history_form">
137             <field name="name">blog.post.history.form</field>
138             <field name="model">blog.post.history</field>
139             <field name="arch" type="xml">
140                 <form string="Blog Post History">
141                     <label for="post_id" class="oe_edit_only"/>
142                     <h1><field name="post_id" select="1" /></h1>
143                     <label for="create_date" class="oe_edit_only"/>
144                     <field name="create_date" readonly="1"/>
145                 </form>
146             </field>
147         </record>
148         <!-- History Action  -->
149         <record model="ir.actions.act_window" id="action_history">
150             <field name="name">Page history</field>
151             <field name="res_model">blog.post.history</field>
152             <field name="view_type">form</field>
153             <field name="view_mode">tree,form</field>
154         </record>
155         <menuitem id="menu_page_history" parent="menu_wiki" name="Pages history" action="action_history" sequence="30" groups="base.group_no_one"/>
156         <act_window
157             id="action_related_page_history"
158             context="{'search_default_post_id': [active_id], 'default_post_id': active_id}"
159             domain="[('post_id','=',active_id)]"
160             name="Page History"
161             res_model="blog.post.history"
162             src_model="blog.post"/>
163
164         <record model="ir.ui.view" id="blog_tag_tree">
165             <field name="name">blog_tag_tree</field>
166             <field name="model">blog.tag</field>
167             <field name="arch" type="xml">
168                 <tree string="Tag List" create="false">
169                     <field name="name"/>
170                     <field name="post_ids"/>
171                 </tree>
172             </field>
173         </record>
174
175         <record model="ir.ui.view" id="blog_tag_form">
176             <field name="name">blog_tag_form</field>
177             <field name="model">blog.tag</field>
178             <field name="arch" type="xml">
179                 <form string="Tag Form">
180                     <sheet>
181                         <group>
182                             <field name="name"/>
183                         </group>
184                         <label for="post_ids" string="Used in: "/>
185                         <field name="post_ids"/>
186                     </sheet>
187                 </form>
188             </field>
189         </record>
190
191         <record model="ir.actions.act_window" id="action_tags">
192             <field name="name">Blog Tags</field>
193             <field name="res_model">blog.tag</field>
194             <field name="view_type">form</field>
195             <field name="view_mode">tree,form,graph</field>
196             <field name="view_id" ref="blog_tag_tree"/>
197         </record>
198
199         <menuitem id="menu_blog_tag" parent="menu_wiki" name="Blog Tags" action="action_tags" sequence="40" />
200     </data>
201 </openerp>