From c1d1b273e2eeb3c4713fe174846ec7687ec2026b Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Thu, 19 Sep 2024 09:57:39 +0700 Subject: update new register --- indoteknik_custom/models/res_partner.py | 3 ++- indoteknik_custom/models/user_company_request.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/res_partner.py b/indoteknik_custom/models/res_partner.py index 7392b10d..ef857c55 100644 --- a/indoteknik_custom/models/res_partner.py +++ b/indoteknik_custom/models/res_partner.py @@ -18,7 +18,8 @@ class ResPartner(models.Model): ('pkp', 'PKP'), ('nonpkp', 'Non PKP') ]) - sppkp = fields.Char(string="SPPKP") + sppkp = fields.Char(string="SPPKP", tracking=3) + npwp = fields.Char(string="NPWP", tracking=3) counter = fields.Integer(string="Counter", default=0) leadtime = fields.Integer(string="Leadtime", default=0) digital_invoice_tax = fields.Boolean(string="Digital Invoice & Faktur Pajak") diff --git a/indoteknik_custom/models/user_company_request.py b/indoteknik_custom/models/user_company_request.py index 56bb8d5d..40ac4446 100644 --- a/indoteknik_custom/models/user_company_request.py +++ b/indoteknik_custom/models/user_company_request.py @@ -33,10 +33,12 @@ class UserCompanyRequest(models.Model): self.user_id.property_account_receivable_id = self.user_company_id.property_account_receivable_id self.user_id.property_account_payable_id = self.user_company_id.property_account_payable_id self.user_company_id.active = True + # tambahkan send email kalau bisnis berhsil di buat else: new_company = self.env['res.partner'].create({ 'name': self.user_input }) self.user_id.parent_id = new_company.id + # tambahkan send email kalau bisnis ditolak di buat return super(UserCompanyRequest, self).write(vals) \ No newline at end of file -- cgit v1.2.3