summaryrefslogtreecommitdiff
path: root/addons/crm/wizard/crm_lead_lost.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/crm/wizard/crm_lead_lost.py')
-rw-r--r--addons/crm/wizard/crm_lead_lost.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/addons/crm/wizard/crm_lead_lost.py b/addons/crm/wizard/crm_lead_lost.py
new file mode 100644
index 00000000..8f64a405
--- /dev/null
+++ b/addons/crm/wizard/crm_lead_lost.py
@@ -0,0 +1,14 @@
+# -*- coding: utf-8 -*-
+
+from odoo import api, fields, models
+
+
+class CrmLeadLost(models.TransientModel):
+ _name = 'crm.lead.lost'
+ _description = 'Get Lost Reason'
+
+ lost_reason_id = fields.Many2one('crm.lost.reason', 'Lost Reason')
+
+ def action_lost_reason_apply(self):
+ leads = self.env['crm.lead'].browse(self.env.context.get('active_ids'))
+ return leads.action_set_lost(lost_reason=self.lost_reason_id.id)