summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/crm_lead.py
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2024-04-29 09:24:25 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2024-04-29 09:24:25 +0700
commit074b99031f5123976bb67aab1cf1a6286464e724 (patch)
tree2809d42a13b35c42ec00d93a40a414e7713a1bc2 /indoteknik_custom/models/crm_lead.py
parentb5a42eda62ae2b3536a072b9cb21a61e91a7b49a (diff)
parentca03f0119e33dd62adbf998106378d8e0f4096b6 (diff)
Merge branch 'production' into feature/request-by-abl
Diffstat (limited to 'indoteknik_custom/models/crm_lead.py')
-rwxr-xr-xindoteknik_custom/models/crm_lead.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/indoteknik_custom/models/crm_lead.py b/indoteknik_custom/models/crm_lead.py
index e8721142..9ffd607c 100755
--- a/indoteknik_custom/models/crm_lead.py
+++ b/indoteknik_custom/models/crm_lead.py
@@ -23,6 +23,15 @@ class CrmLead(models.Model):
operator_name = fields.Char('Operator Name', help='Operator yang membalas')
order_id = fields.Many2one('sale.order', string='Sales Order', help='Link ke sales order id')
+ @api.model
+ def create(self, vals):
+ rec = super(CrmLead, self).create(vals)
+
+ if rec.email_from == 'api.noreply@altama.co.id' and rec.name.startswith('INDOTEKNIK|ODOO|'):
+ rec.user_id = 20 # User ID: Nabila Rahmawati
+
+ return rec
+
@api.onchange('user_id')
def _change_salesperson_so(self):
if self.order_id: