summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/res_partner.py
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2024-11-29 03:18:21 +0000
committerIT Fixcomart <it@fixcomart.co.id>2024-11-29 03:18:21 +0000
commitfa3da08e5c0837e1492a3b00b17b7492c07ac676 (patch)
treea98cb41a39064f692d764338177b84fd14bed82a /indoteknik_custom/models/res_partner.py
parent0080b6b1da5f181cee32fae7bb5166ce65165374 (diff)
parent8906f678c23090d70d16191dc1fe76e518e8e9d9 (diff)
Merged in CR/quotation-noPo (pull request #254)
CR/quotation noPo
Diffstat (limited to 'indoteknik_custom/models/res_partner.py')
-rw-r--r--indoteknik_custom/models/res_partner.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/indoteknik_custom/models/res_partner.py b/indoteknik_custom/models/res_partner.py
index 4297012c..da4a6cb6 100644
--- a/indoteknik_custom/models/res_partner.py
+++ b/indoteknik_custom/models/res_partner.py
@@ -1,7 +1,7 @@
from odoo import models, fields, api
from odoo.exceptions import UserError, ValidationError
from datetime import datetime
-
+from odoo.http import request
class GroupPartner(models.Model):
_name = 'group.partner'
@@ -244,6 +244,14 @@ class ResPartner(models.Model):
def _onchange_customer_type(self):
if self.customer_type == 'nonpkp':
self.npwp = '00.000.000.0-000.000'
-
+ def get_check_tempo_partner(self):
+ self.ensure_one()
+
+ partner = self.parent_id or self
+
+ if not partner.property_payment_term_id or 'Tempo' not in partner.property_payment_term_id.name:
+ return False
+ else:
+ return True