diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-11-29 10:02:48 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-11-29 10:02:48 +0700 |
| commit | af39e11dba2e6f9a57a520003888884c9f0f2571 (patch) | |
| tree | a89951d15dcb6875d10bd812208d805d62792d44 /indoteknik_api/controllers/api_v1/user.py | |
| parent | 50c393ff5f372cdf751d30efe9fb6fde305f9206 (diff) | |
<iman> update code switch account
Diffstat (limited to 'indoteknik_api/controllers/api_v1/user.py')
| -rw-r--r-- | indoteknik_api/controllers/api_v1/user.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/indoteknik_api/controllers/api_v1/user.py b/indoteknik_api/controllers/api_v1/user.py index 56b89b27..a94ba1f8 100644 --- a/indoteknik_api/controllers/api_v1/user.py +++ b/indoteknik_api/controllers/api_v1/user.py @@ -509,6 +509,12 @@ class User(controller.Controller): 'mimetype': sppkp_mimetype }) match_company.message_post(body="SPPKP Uploaded", attachment_ids=[sppkp_attachment.id]) + request.env['user.company.request'].create({ + 'user_id': user.id, + 'user_company_id': match_company.id, + 'user_input': business_name, + 'is_switch_account': True + }) else: match_company = request.env['res.partner'].search(parameter, limit=1) match_ratio = 0 @@ -636,11 +642,12 @@ class User(controller.Controller): new_company.message_post(body="SPPKP Uploaded", attachment_ids=[sppkp_attachment.id]) request_company = self.get_user_by_email(user.email) request_company.parent_name = business_name - if user.parent_id: - request_company.send_company_switch_approve_mail() - else: - request_company.send_company_request_mail_switch() + # if user.parent_id: + # request_company.send_company_switch_approve_mail() + # else: + # request_company.send_company_request_mail_switch() + request_company.send_company_request_mail_switch() response['switch'] = 'Pending' return self.response(response) |
