summaryrefslogtreecommitdiff
path: root/addons/maintenance/models
diff options
context:
space:
mode:
authorXavierDo <xdo@odoo.com>2019-02-19 14:30:18 +0000
committerXavier-Do <xdo@odoo.com>2019-03-28 09:34:11 +0000
commitfbafbf2230c485ea04ab03c778455bb59389c7d9 (patch)
tree1ede6ccf3db082c6c15b15dd546258bdbfc4b529 /addons/maintenance/models
parente1cd5bbedeac95e65d84da0b7657b8d54ecb6ce3 (diff)
[IMP] mail, test_mail, *: add new email.cc.mixin on main models
*: crm, project, maintenance, hr_recruitment When a record is created from an email, cc can be lost. This commit proposes a new mixin to keep cc on the record and allows to create partner for each of them when sending a message from the chatter. The mixin is added on the mail recors that can be created from mail.alias: document helpdesk.ticket mrp.eco quality.alert hr.applicant crm.lead project.task mail.channel maintenance.equipment Task: 1925001
Diffstat (limited to 'addons/maintenance/models')
-rw-r--r--addons/maintenance/models/maintenance.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/maintenance/models/maintenance.py b/addons/maintenance/models/maintenance.py
index cd7c3a69120..fcb3436940c 100644
--- a/addons/maintenance/models/maintenance.py
+++ b/addons/maintenance/models/maintenance.py
@@ -81,7 +81,7 @@ class MaintenanceEquipmentCategory(models.Model):
return res
def get_alias_model_name(self, vals):
- return vals.get('alias_model', 'maintenance.equipment')
+ return vals.get('alias_model', 'maintenance.request')
def get_alias_values(self):
values = super(MaintenanceEquipmentCategory, self).get_alias_values()
@@ -253,9 +253,10 @@ class MaintenanceEquipment(models.Model):
if not next_requests:
equipment._create_new_request(equipment.next_action_date)
+
class MaintenanceRequest(models.Model):
_name = 'maintenance.request'
- _inherit = ['mail.thread', 'mail.activity.mixin']
+ _inherit = ['mail.thread.cc', 'mail.activity.mixin']
_description = 'Maintenance Request'
_order = "id desc"