summaryrefslogtreecommitdiff
path: root/addons/hr_expense/data
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2017-11-29 15:09:28 +0100
committerThibault Delavallée <tde@odoo.com>2018-03-27 15:19:34 +0200
commit133fd0a21e7de2f5f64e3d337c6a427e249576ee (patch)
tree1f9c6daa1e172b913e390c90056611fa7b6bd6b9 /addons/hr_expense/data
parent238c20ffff464ca395ce27cacd1ce0da81b498b9 (diff)
[IMP] hr_expense: improve activity management on expense sheet model
This commit improves expense flow management through a better integration of activities and addition of automated activities. Several things are done in this commit : * expense sheet (report) model do not inherit from mail.activity.mixin. This commit adds the inherit so that expense users and managers can now schedule and manage activities on expense reports. This will help them in their daily job; * automatic activities generation is added for expense reports. Activities are generated for approval. They are also automatically set as done when validating or unlinked when refusing or resetting to avoid bloating users with unnecessary activities; * a menu to configure activity types is added. Indeed HR managers should be able to see and configure activity types related to their job; * filters are added to be able to use the systray and to filter the kanban view based on activities Having automated activities allow to replace some messages and tracking that were implemented to warn people of expense reports to approve. This commit therefore * simplifies the tracking as tracking to confirm reports is not necessary anymore; * removes to approve subtype on report model as well as its parent subtype on the department. This allows to simplify chatter in hr_expense app;
Diffstat (limited to 'addons/hr_expense/data')
-rw-r--r--addons/hr_expense/data/mail_data.xml23
1 files changed, 7 insertions, 16 deletions
diff --git a/addons/hr_expense/data/mail_data.xml b/addons/hr_expense/data/mail_data.xml
index be825bac3db..02d662ecff5 100644
--- a/addons/hr_expense/data/mail_data.xml
+++ b/addons/hr_expense/data/mail_data.xml
@@ -2,7 +2,13 @@
<odoo>
<data noupdate="1">
- <!--default alias for leads-->
+ <record id="mail_act_expense_approval" model="mail.activity.type">
+ <field name="name">Expense Approval</field>
+ <field name="icon">fa-dollar</field>
+ <field name="res_model_id" ref="hr_expense.model_hr_expense_sheet"/>
+ </record>
+
+ <!-- default alias for expenses -->
<record id="mail_alias_expense" model="mail.alias">
<field name="alias_name">expense</field>
<field name="alias_model_id" ref="model_hr_expense"/>
@@ -23,27 +29,12 @@
<field name="default" eval="True"/>
<field name="description">Expense report refused</field>
</record>
- <record id="mt_expense_confirmed" model="mail.message.subtype">
- <field name="name">Submitted</field>
- <field name="res_model">hr.expense.sheet</field>
- <field name="description">Expense report submitted, waiting approval</field>
- <field name="default" eval="True"/>
- </record>
<record id="mt_expense_paid" model="mail.message.subtype">
<field name="name">Paid</field>
<field name="res_model">hr.expense.sheet</field>
<field name="description">Expense report paid</field>
<field name="default" eval="False"/>
</record>
- <!-- Department (Parent) related subtypes for messaging / Chatter -->
- <record id="mt_department_expense_confirmed" model="mail.message.subtype">
- <field name="name">Expenses To Approve</field>
- <field name="res_model">hr.department</field>
- <field name="default" eval="False"/>
- <field name="parent_id" eval="ref('mt_expense_confirmed')"/>
- <field name="relation_field">department_id</field>
- <field name="sequence" eval="10"/>
- </record>
<!-- Email Templates -->
<template id="hr_expense_template_refuse_reason">