cfbdfd5300ccef00d509b52405a3189f04402fd4
[odoo/odoo.git] / addons / note / note_view.xml
1 <?xml version="1.0"?>
2 <openerp>
3   <data>
4     <!-- note Stage Form View -->
5     <record model="ir.ui.view" id="view_note_stage_form">
6       <field name="name">note.stage.form</field>
7       <field name="model">note.stage</field>
8       <field name="arch" type="xml">
9         <form string="Stage of Notes">
10           <group>
11             <field name="name"/>
12           </group>
13         </form>
14       </field>
15     </record>
16
17     <!-- note Stage Tree View -->
18     <record model="ir.ui.view" id="view_note_stage_tree">
19       <field name="name">note.stage.tree</field>
20       <field name="model">note.stage</field>
21       <field name="field_parent"></field>
22       <field name="arch" type="xml">
23         <tree string="Stages of Notes" editable="bottom">
24             <field name="sequence" widget="handle"/>
25             <field name="name"/>
26             <field name="fold"/>
27         </tree>
28       </field>
29     </record>
30
31     <!-- note Stage Action -->
32     <record model="ir.actions.act_window" id="action_note_stage">
33         <field name="name">Stages</field>
34         <field name="res_model">note.stage</field>
35         <field name="view_mode">tree,form</field>
36         <field name="domain">[('user_id','=',uid)]</field>
37     </record>
38
39     <!-- New note Kanban View -->
40     <record model="ir.ui.view" id="view_note_note_kanban">
41       <field name="name">note.note.kanban</field>
42       <field name="model">note.note</field>
43       <field name="arch" type="xml">
44         <kanban default_group_by="stage_id" class="oe_notes oe_kanban_quickcreate_textarea">
45           <field name="color"/>
46           <field name="sequence"/>
47           <field name="name"/>
48           <field name="stage_id"/>
49           <field name="open"/>
50           <field name="memo"/>
51           <field name="date_done"/>
52           <field name="message_follower_ids"/>
53           <field name="tag_ids"/>
54           <templates>
55             <t t-name="kanban-box">
56
57               <t t-set="record.group_fancy" t-value="1"  groups="note.group_note_fancy"/>
58
59               <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_global_click_edit oe_semantic_html_override oe_kanban_card #{record.group_fancy==1 ? 'oe_kanban_card_fancy' : ''}">
60                 <div class="oe_dropdown_kanban">
61
62                   <!-- dropdown menu -->
63                   <span class="oe_dropdown_toggle">
64                     <span class="oe_e">í</span>
65                     <ul class="oe_dropdown_menu">
66                       <li><a type="delete">Delete</a></li>
67                       <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
68                     </ul>
69                   </span>
70                   <div style="display: inline">
71                     <a name="onclick_note_is_done" type="object" t-if="record.open.raw_value" class="oe_e">W</a>
72                     <a name="onclick_note_not_done" type="object" t-if="!record.open.raw_value" class="oe_e">W</a>
73                   </div>
74                 </div>
75                 <!-- kanban note -->
76                 <div t-attf-class="oe_kanban_content #{record.open.raw_value ? '' : 'note_text_line_through'}">
77                   <!-- title -->
78                   <field name="name"/>
79                 </div>
80                 <div class="oe_clear"></div>
81                 <field name="tag_ids"/>
82                 <div class="oe_right">
83                   <t t-foreach="record.message_follower_ids.raw_value" t-as="follower">
84                     <img t-att-src="kanban_image('res.partner', 'image_small', follower)" width="24" height="24" class="oe_kanban_avatar" t-att-data-member_id="follower"/>
85                   </t>
86                 </div>
87                 <div class="oe_clear"></div>
88               </div>
89             </t>
90           </templates>
91         </kanban>
92       </field>
93     </record>
94
95     <!-- New note Form View -->
96     <record model="ir.ui.view" id="view_note_note_tree">
97       <field name="name">note.note.tree</field>
98       <field name="model">note.note</field>
99       <field name="arch" type="xml">
100         <tree string="Stages">
101           <field name="name"/>
102           <field name="open"/>
103           <field name="stage_id"/>
104           <field name="tag_ids" widget="many2many_tags"/>
105         </tree>
106       </field>
107     </record>
108
109     <!-- New note Form View -->
110     <record model="ir.ui.view" id="view_note_note_form">
111         <field name="name">note.note.form</field>
112         <field name="model">note.note</field>
113         <field name="arch" type="xml">
114             <form string="Note" class="oe_form_nomargin">
115                 <header>
116                     <field name="tag_ids" widget="many2many_tags" class="oe_inline" placeholder="Tags"/>
117                     <field name="stage_id" domain="[('user_id','=',uid)]" widget="statusbar" clickable="1"/>
118                 </header>
119                 <field name="memo" widget="html" class="oe_memo" editor_height="450px" />
120                 <div class="oe_chatter">
121                     <field name="message_follower_ids" widget="mail_followers"/>
122                     <field name="message_ids" widget="mail_thread"/>
123                 </div>
124             </form>
125         </field>
126     </record>
127
128     <!-- Search note  -->
129     <record model="ir.ui.view" id="view_note_note_filter">
130       <field name="name">note.note.search</field>
131       <field name="model">note.note</field>
132       <field name="arch" type="xml">
133         <search string="Notes">
134           <field name="memo" string="Note"/>
135           <field name="tag_ids"/>
136           <filter name="open_true" string="Active" domain="[('open', '=', True)]"/>
137           <filter name="open_false" string="Archive" domain="[('open', '=', False)]"/>
138           <group expand="0" string="Group By">
139             <filter icon="terp-stock_symbol-selection" string="Stage" help="By sticky note Category" context="{'group_by':'stage_id'}"/>
140           </group>
141         </search>
142       </field>
143     </record>
144
145
146     <!-- general settings -->
147     <record model="ir.ui.view" id="view_general_settings_note_form">
148       <field name="name">note.view.general_settings.form</field>
149       <field name="model">base.config.settings</field>
150       <field name="inherit_id" ref="base_setup.view_general_configuration"/>
151       <field name="arch" type="xml">
152         <xpath expr="//label[@string='Authentication']/.." position="after">
153           <group>
154               <label for="id" string="Notes"/>
155               <div name="note">
156                   <div>
157                       <field name="module_note_pad" class="oe_inline"/>
158                       <label for="module_note_pad"/>
159                   </div>
160                   <div>
161                       <field name="group_note_fancy" class="oe_inline"/>
162                       <label for="group_note_fancy"/>
163                   </div>
164               </div>
165           </group>
166         </xpath>
167       </field>
168     </record>
169
170     <!-- Action -->
171     <record model="ir.actions.act_window" id="action_note_note">
172       <field name="name">Notes</field>
173       <field name="res_model">note.note</field>
174       <field name="view_type">form</field>
175       <field name="view_mode">kanban,tree,form</field>
176       <field name="search_view_id" ref="view_note_note_filter"/>
177       <field name="context">{}</field>
178       <field name="help" type="html">
179           <p class="oe_view_nocontent_create">
180             Click to add a personal note.
181           </p><p>
182             Use notes to organize personal tasks or notes. All
183             notes are private; no one else will be able to see them. However
184             you can share some notes with other people by inviting followers
185             on the note. (Useful for meeting minutes, especially if
186             you activate the pad feature for collaborative writings).
187           </p><p>
188             You can customize how you process your notes/tasks by adding,
189             removing or modifying columns.
190           </p>
191         </field>
192     </record>
193
194     <menuitem name="Notes" id="menu_note_notes" parent="mail.mail_my_stuff" sequence="20" action="note.action_note_note"/>
195     <menuitem name="Stages" id="menu_notes_stage" parent="mail.mail_my_stuff" action="note.action_note_stage" sequence="21" groups="base.group_no_one"/>
196
197   </data>
198 </openerp>