diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2023-08-08 02:59:04 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2023-08-08 02:59:04 +0000 |
| commit | 1613b43341a312a42f87e9a7ff34fbb485878710 (patch) | |
| tree | 65cc6bad21cd7c5cef569ffe154e9a73517821f5 | |
| parent | 4d665c47060f4d3506d7dffe7f18a2d481fe5497 (diff) | |
| parent | 82368e58dbc4d1ee8f6ff842ebb349172256d449 (diff) | |
Merged in production (pull request #87)
Production
| -rwxr-xr-x | indoteknik_custom/models/crm_lead.py | 20 | ||||
| -rw-r--r-- | indoteknik_custom/views/airway_bill.xml | 6 |
2 files changed, 21 insertions, 5 deletions
diff --git a/indoteknik_custom/models/crm_lead.py b/indoteknik_custom/models/crm_lead.py index 4efe23c5..e5d9953b 100755 --- a/indoteknik_custom/models/crm_lead.py +++ b/indoteknik_custom/models/crm_lead.py @@ -1,5 +1,6 @@ from odoo import fields, models, api import logging +import random _logger = logging.getLogger(__name__) @@ -54,7 +55,6 @@ class CrmLead(models.Model): ('active', '=', True), ('type', '=', 'lead'), ('tag_ids', '=', False), - # ('id', '=', 12523) ], limit=1000) for lead in leads: _logger.info('processing tagged lead %s' % lead.id) @@ -79,16 +79,26 @@ class CrmLead(models.Model): input_tags.append(1510) #no tag lead.tag_ids = input_tags - if not lead.partner_id: - salesperson_id = 20 - if not lead.user_id or lead.user_id.id in [2, 25]: partner = lead.partner_id.parent_id or lead.partner_id if partner.user_id and partner.user_id.id not in [2, 25]: salesperson_id = partner.user_id.id else: salesperson_id = 20 - + else: + partner = lead.partner_id.parent_id or lead.partner_id + if partner.user_id and partner.user_id.id not in [2, 25]: + salesperson_id = partner.user_id.id + else: + salesperson_id = 20 + lead.user_id = salesperson_id + # def _create_testing_tags_leads(self): + # angka_bulat_acak = random.randint(1, 1000) + # self.env['crm.lead'].create([{ + # 'name': 'testing', + # 'partner_id': 69 + # }]) + diff --git a/indoteknik_custom/views/airway_bill.xml b/indoteknik_custom/views/airway_bill.xml index bbfd3991..015f20f2 100644 --- a/indoteknik_custom/views/airway_bill.xml +++ b/indoteknik_custom/views/airway_bill.xml @@ -102,4 +102,10 @@ action="airway_bill_action" parent="stock.menu_stock_warehouse_mgmt" sequence="200"/> + + <menuitem id="menu_bill_airway" + name="Airway Bill" + action="airway_bill_action" + parent="website_sale.menu_orders" + sequence="7"/> </odoo>
\ No newline at end of file |
