As part of the back2basics, the stage messages were modified to be clearer * when an opportunity is lost previously 2 separated messages where created in the chatter (one for the reason, one for the active state) now, one message is created with both infos; * new message when an opportunity is restored; There where also some fixes to typos, and an the probability of a lead to be successful received a new title "estimated by Odoo". Task 2026297 closes odoo/odoo#35308 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
15 lines
437 B
Python
15 lines
437 B
Python
# -*- 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)
|