[REM] hr_expense: remove assigned subtype and keep only classic tracking

Since e9734f4975 assignation is now a notification sent in the
inbox or by email to the newly-assigned responsible. It is therefore
considered as not necessary to link a subtype to the assignation itself.
Indeed having it logged in the discussion history as a classic tracking
in addition to the notification is considered as sufficient.

This commit is related to task ID 60790. Closes #23244 .
This commit is contained in:
Thibault Delavallée
2018-03-20 13:58:13 +01:00
parent b227f6e759
commit c7dff653d5
2 changed files with 8 additions and 16 deletions
+8 -14
View File
@@ -35,20 +35,14 @@
<field name="description">Expense report paid</field>
<field name="default" eval="False"/>
</record>
<record id="mt_expense_responsible" model="mail.message.subtype">
<field name="name">Responsible</field>
<field name="res_model">hr.expense.sheet</field>
<field name="description">Changes of responsible</field>
<field name="default" eval="True"/>
</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"/>
<!-- 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 -->
-2
View File
@@ -560,8 +560,6 @@ class HrExpenseSheet(models.Model):
return 'hr_expense.mt_expense_refused'
elif 'state' in init_values and self.state == 'done':
return 'hr_expense.mt_expense_paid'
elif 'user_id' in init_values:
return 'hr_expense.mt_expense_responsible'
return super(HrExpenseSheet, self)._track_subtype(init_values)
def _get_users_to_subscribe(self, employee=False):