diff options
| author | Thibault Delavallée <tde@odoo.com> | 2018-02-21 18:13:21 +0100 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2018-03-20 13:58:13 +0100 |
| commit | c7dff653d56910fd46e4dcf745c2c6088ce9fc58 (patch) | |
| tree | 7f434ec14743167fbe8d09fc0abb302f73cb73db | |
| parent | b227f6e7597e2158ee431654b12c369363739b15 (diff) | |
[REM] hr_expense: remove assigned subtype and keep only classic tracking
Since e9734f4975904b6196423b7f5de7dd211809d6f6 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 .
| -rw-r--r-- | addons/hr_expense/data/mail_data.xml | 22 | ||||
| -rw-r--r-- | addons/hr_expense/models/hr_expense.py | 2 |
2 files changed, 8 insertions, 16 deletions
diff --git a/addons/hr_expense/data/mail_data.xml b/addons/hr_expense/data/mail_data.xml index 57b22e33f55..be825bac3db 100644 --- a/addons/hr_expense/data/mail_data.xml +++ b/addons/hr_expense/data/mail_data.xml @@ -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 --> diff --git a/addons/hr_expense/models/hr_expense.py b/addons/hr_expense/models/hr_expense.py index a97052e0445..cb1d4b6a93f 100644 --- a/addons/hr_expense/models/hr_expense.py +++ b/addons/hr_expense/models/hr_expense.py @@ -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): |
