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;
49 lines
2.0 KiB
XML
49 lines
2.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data noupdate="1">
|
|
|
|
<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"/>
|
|
<field name="alias_user_id" ref="base.user_root"/>
|
|
<field name="alias_contact">employees</field>
|
|
</record>
|
|
|
|
<!-- Expense-related subtypes for messaging / Chatter -->
|
|
<record id="mt_expense_approved" model="mail.message.subtype">
|
|
<field name="name">Approved</field>
|
|
<field name="res_model">hr.expense.sheet</field>
|
|
<field name="default" eval="True"/>
|
|
<field name="description">Expense report approved</field>
|
|
</record>
|
|
<record id="mt_expense_refused" model="mail.message.subtype">
|
|
<field name="name">Refused</field>
|
|
<field name="res_model">hr.expense.sheet</field>
|
|
<field name="default" eval="True"/>
|
|
<field name="description">Expense report refused</field>
|
|
</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>
|
|
|
|
<!-- Email Templates -->
|
|
<template id="hr_expense_template_refuse_reason">
|
|
<p>Your Expense <t t-if="is_sheet">Report </t><t t-esc="name"/> has been refused</p>
|
|
<ul class="o_timeline_tracking_value_list">
|
|
<li>Reason : <t t-esc="reason"/></li>
|
|
</ul>
|
|
</template>
|
|
|
|
</data>
|
|
</odoo>
|