diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/mail_client_extension/models/crm_lead.py | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/mail_client_extension/models/crm_lead.py')
| -rw-r--r-- | addons/mail_client_extension/models/crm_lead.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/addons/mail_client_extension/models/crm_lead.py b/addons/mail_client_extension/models/crm_lead.py new file mode 100644 index 00000000..1bc5c8f0 --- /dev/null +++ b/addons/mail_client_extension/models/crm_lead.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo import api, models + +class Lead(models.Model): + _inherit = 'crm.lead' + + @api.model + def _form_view_auto_fill(self): + return { + 'type': 'ir.actions.act_window', + 'view_mode': 'form', + 'res_model': 'crm.lead', + 'context': { + 'default_partner_id': self.env.context.get('params', {}).get('partner_id'), + } + } |
