summaryrefslogtreecommitdiff
path: root/indoteknik_custom
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-04-26 16:08:10 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-04-26 16:08:10 +0700
commitca03f0119e33dd62adbf998106378d8e0f4096b6 (patch)
tree7e6678b92d7ae854a157e1dce3e5f02cd57b3f5e /indoteknik_custom
parent5ae667c09db0eaccdaff9607838c9adeb58fb069 (diff)
parent697e3397eecca7e84f05965d1f8c4b37aedfb0c6 (diff)
Merge branch 'production' of bitbucket.org:altafixco/indoteknik-addons into production
Diffstat (limited to 'indoteknik_custom')
-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: