diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-04-15 10:36:32 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-04-15 10:36:32 +0700 |
| commit | f76c3426b4f92bb3622a0ce2f012923d876de6c2 (patch) | |
| tree | 2baad0959af06964c890a7e65fc5f76c8e61fd88 | |
| parent | eba12015d465f1a0ed5f4806460352707f2961f7 (diff) | |
fix sales person in leads
| -rwxr-xr-x | indoteknik_custom/models/crm_lead.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/indoteknik_custom/models/crm_lead.py b/indoteknik_custom/models/crm_lead.py index e3d7d8ed..913c670e 100755 --- a/indoteknik_custom/models/crm_lead.py +++ b/indoteknik_custom/models/crm_lead.py @@ -45,7 +45,8 @@ class CrmLead(models.Model): leads = self.env['crm.lead'].search([ ('active', '=', True), ('type', '=', 'lead'), - ('tag_ids', '=', False), + # ('tag_ids', '=', False), + ('id', '=', 12523) ], limit=1000) for lead in leads: tags = self.env['crm.tag'].search([('id', '>', 0)]) @@ -57,7 +58,7 @@ class CrmLead(models.Model): if not lead.partner_id: continue - if not lead.user_id or lead.user_id == 2: + if not lead.user_id or lead.user_id.id == 2: if lead.partner_id.parent_id: salesperson_id = lead.partner_id.parent_id.user_id.id else: |
