diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-10-01 13:31:27 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-10-01 13:31:27 +0700 |
| commit | 471bfb3cff31dac389fd9b8cba5ec8b7e465c82f (patch) | |
| tree | 1d559cbcb39220d4eb4f32c633b491584e2bba3f /indoteknik_api/controllers/api_v1 | |
| parent | 48322cab6c0b10bf85dec9beffffd2c1064aa8a5 (diff) | |
<iman> update switch account
Diffstat (limited to 'indoteknik_api/controllers/api_v1')
| -rw-r--r-- | indoteknik_api/controllers/api_v1/user.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/indoteknik_api/controllers/api_v1/user.py b/indoteknik_api/controllers/api_v1/user.py index 77dc60d0..6f71174c 100644 --- a/indoteknik_api/controllers/api_v1/user.py +++ b/indoteknik_api/controllers/api_v1/user.py @@ -462,7 +462,6 @@ class User(controller.Controller): 'nama_wajib_pajak': nama_wajib_pajak, 'alamat_lengkap_text': alamat_wajib_pajak, 'street': alamat_bisnis, - 'active': False, } match_company.write(new_data) @@ -496,7 +495,7 @@ class User(controller.Controller): else: # Create a user company request request.env['user.company.request'].create({ - 'user_id': user.partner_id.id, + 'user_id': user.id, 'user_company_id': match_company.id, 'user_input': business_name }) @@ -572,7 +571,10 @@ 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 - request_company.send_company_request_mail() + if user.parent_id: + request_company.send_company_request_approve_mail() + else: + request_company.send_company_request_mail() response['switch'] = 'Pending' return self.response(response) |
