diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-11-22 09:47:09 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-11-22 09:47:09 +0700 |
| commit | 14559e52ce09e6e73c220987455c43ce89f9eabf (patch) | |
| tree | f1376589fe885ef42ea45ab6cb3bc7f71c7d476a /indoteknik_custom/models/res_partner.py | |
| parent | 755e36e6fed87f787c2a0d31f4318a6eae97e55c (diff) | |
| parent | 4e84a3c939f50315c5eba4a9ae350f17383b5543 (diff) | |
Merge branch 'production' into iman/pengajuan-tempo
# Conflicts:
# indoteknik_custom/models/res_partner.py
Diffstat (limited to 'indoteknik_custom/models/res_partner.py')
| -rw-r--r-- | indoteknik_custom/models/res_partner.py | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/indoteknik_custom/models/res_partner.py b/indoteknik_custom/models/res_partner.py index ec027ec1..9d1b70f8 100644 --- a/indoteknik_custom/models/res_partner.py +++ b/indoteknik_custom/models/res_partner.py @@ -11,6 +11,16 @@ class GroupPartner(models.Model): class ResPartner(models.Model): _inherit = 'res.partner' + property_account_payable_id = fields.Many2one('account.account', company_dependent=True, + string="Account Payable", + domain="[('internal_type', '=', 'payable'), ('deprecated', '=', False), ('company_id', '=', current_company_id)]", + help="This account will be used instead of the default one as the payable account for the current partner", + default=438) + property_account_receivable_id = fields.Many2one('account.account', company_dependent=True, + string="Account Receivable", + domain="[('internal_type', '=', 'receivable'), ('deprecated', '=', False), ('company_id', '=', current_company_id)]", + help="This account will be used instead of the default one as the receivable account for the current partner", + default=395) # Referensi supplier_ids = fields.Many2many('user.pengajuan.tempo.line', string="Suppliers") @@ -85,7 +95,7 @@ class ResPartner(models.Model): counter = fields.Integer(string="Counter", default=0) leadtime = fields.Integer(string="Leadtime", default=0) digital_invoice_tax = fields.Boolean(string="Digital Invoice & Faktur Pajak") - is_potential = fields.Boolean(string='Potential') + is_not_potential = fields.Boolean(string='Not Potential') pakta_integritas = fields.Boolean(string='Pakta Integritas') use_so_approval = fields.Boolean(string='Use SO Approval') @@ -116,6 +126,16 @@ class ResPartner(models.Model): company_type = fields.Selection(string='Company Type', selection=[('person', 'Individual'), ('company', 'Company')], compute='_compute_company_type', inverse='_write_company_type', tracking=3) + warning_stage = fields.Float(string='Warning Amount', + help="A warning message will appear once the " + "selected customer is crossed warning " + "amount. Set its value to 0.00 to" + " disable this feature", tracking=3) + blocking_stage = fields.Float(string='Blocking Amount', + help="Cannot make sales once the selected " + "customer is crossed blocking amount." + "Set its value to 0.00 to disable " + "this feature", tracking=3) @api.model def _default_payment_term(self): @@ -307,8 +327,7 @@ class ResPartner(models.Model): # res = super(ResPartner, self).write(vals) # return res - @api.depends('company_type', 'parent_id', 'npwp', 'sppkp', 'nama_wajib_pajak', 'alamat_lengkap_text', 'industry_id', - 'company_type_id') + @api.depends('company_type', 'parent_id', 'npwp', 'sppkp', 'nama_wajib_pajak','alamat_lengkap_text', 'industry_id', 'company_type_id') def _related_fields(self): for partner in self: if partner.company_type == 'person' and partner.parent_id: |
