File: note_views.xml

package info (click to toggle)
oca-core 11.0.20180730-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 509,684 kB
  • sloc: xml: 258,806; python: 164,081; sql: 217; sh: 92; makefile: 16
file content (252 lines) | stat: -rw-r--r-- 10,040 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<?xml version="1.0"?>
<odoo>
    <!-- note Stage Form View -->
    <record id="view_note_stage_form" model="ir.ui.view">
      <field name="name">note.stage.form</field>
      <field name="model">note.stage</field>
      <field name="arch" type="xml">
        <form string="Stage of Notes">
          <group>
            <field name="name"/>
            <field name="fold"/>
          </group>
        </form>
      </field>
    </record>

    <!-- note Stage Tree View -->
    <record id="view_note_stage_tree" model="ir.ui.view">
      <field name="name">note.stage.tree</field>
      <field name="model">note.stage</field>
      <field name="field_parent"></field>
      <field name="arch" type="xml">
        <tree string="Stages of Notes" editable="bottom">
            <field name="sequence" widget="handle"/>
            <field name="name"/>
            <field name="fold"/>
        </tree>
      </field>
    </record>

    <!-- note Stage Action -->
    <record id="action_note_stage" model="ir.actions.act_window">
        <field name="name">Stages</field>
        <field name="res_model">note.stage</field>
        <field name="view_mode">tree,form</field>
        <field name="domain">[('user_id','=',uid)]</field>
    </record>

    <!-- note Tag Form View -->
    <record id="note_tag_view_form" model="ir.ui.view">
      <field name="name">note.tag.form</field>
      <field name="model">note.tag</field>
      <field name="arch" type="xml">
        <form string="Tags">
          <group>
            <field name="name"/>
          </group>
        </form>
      </field>
    </record>

    <!-- note Tag Tree View -->
    <record id="note_tag_view_tree" model="ir.ui.view">
      <field name="name">note.tag.tree</field>
      <field name="model">note.tag</field>
      <field name="arch" type="xml">
        <tree string="Tags" editable="bottom">
            <field name="name"/>
        </tree>
      </field>
    </record>

    <!-- note Tag Action -->
    <record id="note_tag_action" model="ir.actions.act_window">
      <field name="name">Tags</field>
      <field name="res_model">note.tag</field>
      <field name="view_type">form</field>
      <field name="view_mode">tree,form</field>
      <field name="help" type="html">
        <p class="oe_view_nocontent_create">
          Click to add a new tag.
        </p>
      </field>
    </record>

    <!-- New note Kanban View -->
    <record id="view_note_note_kanban" model="ir.ui.view">
      <field name="name">note.note.kanban</field>
      <field name="model">note.note</field>
      <field name="arch" type="xml">
        <kanban default_group_by="stage_id" class="oe_notes oe_kanban_quickcreate_textarea o_kanban_small_column">
          <field name="color"/>
          <field name="sequence"/>
          <field name="name"/>
          <field name="stage_id"/>
          <field name="open"/>
          <field name="memo"/>
          <field name="date_done"/>
          <field name="message_partner_ids"/>
          <field name="activity_ids" />
          <field name="activity_state" />
          <templates>
            <t t-name="kanban-box">

              <div t-attf-class="#{kanban_color(record.color.raw_value)} oe_kanban_global_click_edit oe_semantic_html_override oe_kanban_card">

                <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>

                <div class="o_dropdown_kanban dropdown">
                    <a class="dropdown-toggle btn" data-toggle="dropdown" href="#" >
                        <span class="fa fa-ellipsis-v"/>
                    </a>
                    <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                        <li><a type="delete">Delete</a></li>
                        <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
                    </ul>
                </div>
                  <span>
                    <a name="action_close" type="object" t-if="record.open.raw_value"><i class="fa fa-check"/></a>
                    <a name="action_open" type="object" t-if="!record.open.raw_value"><i class="fa fa-undo"/></a>
                  </span>
                <!-- kanban note -->
                <span t-attf-class="oe_kanban_content #{record.open.raw_value ? '' : 'note_text_line_through'}">
                  <!-- title -->
                  <field name="name"/>
                  <div class="oe_kanban_bottom_right">
                    <div class="o_kanban_inline_block mr4">
                        <field name="activity_ids" widget="kanban_activity" />
                    </div>
                  </div>
                </span>
                <t t-if="record.message_partner_ids.raw_value.length &gt; 1">
                    <div class="clearfix"></div>
                      <t t-foreach="record.message_partner_ids.raw_value" t-as="follower">
                        <img t-att-src="kanban_image('res.partner', 'image_small', follower)" width="24" height="24" class="oe_kanban_avatar pull-right" t-att-data-member_id="follower"/>
                      </t>
                    <div class="clearfix"></div>
                </t>
              </div>
            </t>
          </templates>
        </kanban>
      </field>
    </record>

    <!-- New note Tree View -->
    <record id="view_note_note_tree" model="ir.ui.view">
      <field name="name">note.note.tree</field>
      <field name="model">note.note</field>
      <field name="arch" type="xml">
        <tree string="Stages">
          <field name="name"/>
          <field name="open"/>
          <field name="stage_id"/>
          <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
        </tree>
      </field>
    </record>

    <!-- New note Form View -->
    <record id="view_note_note_form" model="ir.ui.view">
        <field name="name">note.note.form</field>
        <field name="model">note.note</field>
        <field name="arch" type="xml">
            <form string="Note" class="oe_form_nomargin o_note_form_view">
                <header>
                    <field name="stage_id" domain="[('user_id','=',uid)]" widget="statusbar" clickable="1"/>
                </header>
                <sheet>
                    <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}" placeholder="Tags"/>
                    <field name="memo" widget="html" class="oe_memo" editor_height="450px" />
                </sheet>
                <div class="oe_chatter">
                    <field name="message_follower_ids" widget="mail_followers"/>
                    <field name="activity_ids" widget="mail_activity"/>
                    <field name="message_ids" widget="mail_thread"/>
                </div>
            </form>
        </field>
    </record>

    <!-- Search note  -->
    <record id="view_note_note_filter" model="ir.ui.view">
      <field name="name">note.note.search</field>
      <field name="model">note.note</field>
      <field name="arch" type="xml">
        <search string="Notes">
          <field name="memo" string="Note"/>
          <field name="tag_ids"/>
          <filter name="open_true" string="Active" domain="[('open', '=', True)]"/>
          <filter name="open_false" string="Archive" domain="[('open', '=', False)]"/>
          <separator/>
          <filter string="My Activities" name="activities_my"
                  domain="[('activity_ids.user_id', '=', uid)]"/>
          <separator/>
          <filter string="Late Activities" name="activities_overdue"
                  domain="[('activity_ids.date_deadline', '&lt;', context_today().strftime('%Y-%m-%d'))]"
                  help="Show all records which has next action date is before today"/>
          <filter string="Today Activities" name="activities_today"
                  domain="[('activity_ids.date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/>
          <filter string="Future Activities" name="activities_upcoming_all"
                        domain="[('activity_ids.date_deadline', '&gt;', context_today().strftime('%Y-%m-%d'))
                        ]"/>
          <group expand="0" string="Group By">
            <filter string="Stage" help="By sticky note Category" context="{'group_by':'stage_id'}"/>
          </group>
        </search>
      </field>
    </record>

    <!-- Action -->
    <record id="action_note_note" model="ir.actions.act_window">
      <field name="name">Notes</field>
      <field name="res_model">note.note</field>
      <field name="view_type">form</field>
      <field name="view_mode">kanban,tree,form</field>
      <field name="search_view_id" ref="view_note_note_filter"/>
      <field name="context">{}</field>
      <field name="help" type="html">
          <p class="oe_view_nocontent_create">
            Click to add a personal note.
          </p><p>
            Use notes to organize personal tasks or notes. All
            notes are private; no one else will be able to see them. However
            you can share some notes with other people by inviting followers
            on the note. (Useful for meeting minutes, especially if
            you activate the pad feature for collaborative writings).
          </p><p>
            You can customize how you process your notes/tasks by adding,
            removing or modifying columns.
          </p>
        </field>
    </record>

    <menuitem
      id="menu_note_notes"
      name="Notes"
      sequence="3"
      action="note.action_note_note"
      web_icon="note,static/description/icon.png"/>

    <menuitem
      id="menu_note_configuration"
      name="Configuration"
      sequence="100"
      parent="menu_note_notes"
      groups="base.group_no_one"/>

    <menuitem
      id="menu_notes_stage"
      name="Stages"
      parent="menu_note_configuration"
      action="note.action_note_stage"
      sequence="21"/>

    <menuitem
      id="notes_tag_menu"
      parent="menu_note_configuration"
      action="note_tag_action"
      sequence="22"/>

</odoo>