summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2022-09-19 09:10:47 +0700
committerIT Fixcomart <it@fixcomart.co.id>2022-09-19 09:10:47 +0700
commit68cb8eaa625b9c96de7aeb9fc45c1db81921661e (patch)
treebe2330d3dca01a0c0a24435b4d63e21834c34136
parenta2d3744ee28f5b87a76f9630ab96516feed3baad (diff)
create compute have_visit_service in sale order
-rwxr-xr-xindoteknik_custom/models/sale_order.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 08349bd3..57a4921e 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -17,6 +17,13 @@ class SaleOrder(models.Model):
('pengajuan2', 'Approval Tyas'),
('approved', 'Approved'),
], string='Approval Status', readonly=True, copy=False, index=True, tracking=3)
+ have_visit_service = fields.Boolean(string='Have Visit Service', help='To compute is customer get visit service', compute='_compute_have_visit_service')
+
+ def _compute_have_visit_service(self):
+ limit = 20000000
+ self.have_visit_service = False
+ if self.amount_total > limit:
+ self.have_visit_service = True
# def sale_order_approve(self):
# for order in self: