summaryrefslogtreecommitdiff
path: root/addons/mail/views/mail_activity_views.xml
diff options
context:
space:
mode:
authorDharmang Soni <dpr@openerp.com>2018-04-04 15:34:43 +0530
committerThibault Delavallée <tde@odoo.com>2018-04-09 14:35:06 +0200
commit807c4c3f5e729d8b2f463d93e73b0dbbc008492b (patch)
treedc6774487c50efbd6c09b5ae642744582b3fe260 /addons/mail/views/mail_activity_views.xml
parentc56491b11bc399247a595a2e08bbc940d2be3746 (diff)
[REF] mail, note: move reminder feature from mail to note
This commit refactors f488dc58c37fdc7fd49df759165de641e213444b that added reminder feature in activities. After merging it was suggested specifications were not correct and it has been decided to move the whole reminder feature in note. Reminders are now notes instead of activities. Now when having note appµ systray proposes to create a note / reminder. A note.note record is created with info given by the user. If a date is given in the systray quick create then an activity is scheduled on this note. This means user can create records in activity systray that are not activities but notes used as reminders. Those will use the first availableµ note column for the user. As reminders are now notes the support of activities not linked to any document is removed, as well as archiving activities and tests linked to that behavior. This commit has been not carefully tested nor in-depth reviewied. It is considered as too important for the upcoming freeze. This closes task ID 1833628. Closes #24129 . Many thanks to @dpr-odoo for its quick development and good work on this task.
Diffstat (limited to 'addons/mail/views/mail_activity_views.xml')
-rw-r--r--addons/mail/views/mail_activity_views.xml99
1 files changed, 0 insertions, 99 deletions
diff --git a/addons/mail/views/mail_activity_views.xml b/addons/mail/views/mail_activity_views.xml
index c04f8c82105..1d09f8baedf 100644
--- a/addons/mail/views/mail_activity_views.xml
+++ b/addons/mail/views/mail_activity_views.xml
@@ -182,103 +182,4 @@
</field>
</record>
- <record id="mail_activity_view_form_reminder" model="ir.ui.view">
- <field name="name">mail.activity.view.form</field>
- <field name="model">mail.activity</field>
- <field name="priority">21</field>
- <field name="arch" type="xml">
- <form string="Reminders">
- <sheet>
- <field name="active" invisible="1"/>
- <div class="oe_button_box" name="button_box">
- <button class="oe_stat_button" type="object" name="toggle_active" icon="fa-archive">
- <field name="active" widget="boolean_button" options='{"terminology": "archive"}'/>
- </button>
- </div>
- <group>
- <field name="date_deadline" string="Reminder Date"/>
- </group>
- <field name="note"/>
- </sheet>
- </form>
- </field>
- </record>
-
- <record id="mail_activity_view_kanban" model="ir.ui.view">
- <field name="name">mail.activity.view.kanban</field>
- <field name="model">mail.activity</field>
- <field name="arch" type="xml">
- <kanban class="o_kanban_small_column">
- <field name="summary"/>
- <field name="note"/>
- <field name="active"/>
- <field name="res_id"/>
- <field name="res_model"/>
- <templates>
- <t t-name="kanban-box">
- <div t-attf-class="oe_kanban_global_click">
- <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>
- </ul>
- </div>
- <div class="oe_kanban_content">
- <div>
- <div t-attf-class="#{record.active.raw_value ? '' : 'o_text_line_through'} o_reminder_title">
- <strong><field name="summary"/></strong>
- </div>
- <div class="row">
- <div class="col-xs-10">
- <span class="text-muted"><span class="fa fa-clock-o"/> <field name="date_deadline"/></span>
- </div>
- <div class="col-xs-2">
- <a name="toggle_active" type="object" t-if="record.active.raw_value" title="Mark as done" class="pull-right"><i class="fa fa-check"/></a>
- <a name="toggle_active" type="object" t-if="!record.active.raw_value" title="Re-open reminder" class="pull-right"><i class="fa fa-undo"/></a>
- </div>
- </div>
- </div>
- </div>
- </div>
- </t>
- </templates>
- </kanban>
- </field>
- </record>
-
- <record id="mail_activity_view_search_reminder" model="ir.ui.view">
- <field name="name">mail.activity.reminder.view.search</field>
- <field name="model">mail.activity</field>
- <field name="arch" type="xml">
- <search string="Activity">
- <field name="active"/>
- <field name="note"/>
- <separator/>
- <filter string="Active" name="filter_open_reminders"
- domain="[('active', '=', True)]"/>
- <filter string="Archived" name="filter_closed_reminders"
- domain="[('active', '=', False)]"/>
- <separator/>
- <filter string="Late Reminders" name="activities_overdue" domain="[('date_deadline', '&lt;', context_today().strftime('%Y-%m-%d'))]" help="Show all reminders for which the next action date is before today"/>
- <filter string="Today Reminders" name="activities_today" domain="[('date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/>
- <filter string="Future Reminders" name="activities_upcoming_all" domain="[('date_deadline', '&gt;', context_today().strftime('%Y-%m-%d'))]"/>
- </search>
- </field>
- </record>
-
- <record id="mail_activity_action_reminders" model="ir.actions.act_window">
- <field name="name">Reminders</field>
- <field name="res_model">mail.activity</field>
- <field name="view_type">form</field>
- <field name="search_view_id" ref="mail_activity_view_search_reminder"/>
- <field name="view_ids"
- eval="[(5, 0, 0),
- (0, 0, {'view_mode': 'kanban', 'view_id': ref('mail_activity_view_kanban')}),
- (0, 0, {'view_mode': 'form', 'view_id': ref('mail_activity_view_form_reminder')})]"/>
- <field name="view_id" ref="mail.mail_activity_view_kanban"/>
- <field name="view_mode">kanban,form</field>
- <field name="domain">[('user_id', '=', uid), ('res_model', '=', False), ('res_id', 'in', [0,None])]</field>
- </record>
</odoo>