summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/sale_order.py
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2024-11-29 11:04:28 +0700
committerstephanchrst <stephanchrst@gmail.com>2024-11-29 11:04:28 +0700
commitda323b9570817a90035f8347b4a9db367e193bc5 (patch)
tree69ae7f9c2a0ef11c2615b961b53abb9bea853070 /indoteknik_custom/models/sale_order.py
parent8af6fd1991eb876777cd12f4c35cd0ba42b6a1b5 (diff)
parent301ad8d828e5ff43515b9f1ab467c9082fccd6f7 (diff)
Merge branch 'production' into cr/outgoing_incoming_bu_v2
Diffstat (limited to 'indoteknik_custom/models/sale_order.py')
-rwxr-xr-xindoteknik_custom/models/sale_order.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 315a338a..7fc6d96a 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -99,6 +99,7 @@ class SaleOrder(models.Model):
helper_by_id = fields.Many2one('res.users', 'Helper By')
eta_date = fields.Datetime(string='ETA Date', copy=False, compute='_compute_eta_date')
flash_sale = fields.Boolean(string='Flash Sale', help='Data dari web')
+ is_continue_transaction = fields.Boolean(string='Button Transaction', help='Data dari web')
web_approval = fields.Selection([
('company', 'Company'),
('cust_manager', 'Customer Manager'),
@@ -144,6 +145,14 @@ class SaleOrder(models.Model):
('NP', 'Non Pareto')
])
+ @api.onchange('payment_status')
+ def _is_continue_transaction(self):
+ if not self.is_continue_transaction:
+ if self.payment_status == 'settlement':
+ self.is_continue_transaction = True
+ else:
+ self.is_continue_transaction = False
+
def _compute_total_weight(self):
total_weight = 0
missing_weight_products = []