summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/stock_picking.py
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2023-06-02 14:16:33 +0700
committerstephanchrst <stephanchrst@gmail.com>2023-06-02 14:16:33 +0700
commitaff9fdd49543648bfed395fff0c86af5b0269686 (patch)
tree490a493d51660d9a7cf91ece5de0055cbce2a715 /indoteknik_custom/models/stock_picking.py
parent673e5500269f96492a447eb7ea38ed16b1827468 (diff)
add feature generate payment link midtrans
Diffstat (limited to 'indoteknik_custom/models/stock_picking.py')
-rw-r--r--indoteknik_custom/models/stock_picking.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py
index e63370f5..8c366082 100644
--- a/indoteknik_custom/models/stock_picking.py
+++ b/indoteknik_custom/models/stock_picking.py
@@ -256,6 +256,11 @@ class StockPicking(models.Model):
if self.is_internal_use and not self.env.user.is_accounting:
raise UserError("Harus di Approve oleh Accounting")
+
+ if self.group_id.sale_id:
+ if self.group_id.sale_id.payment_link_midtrans:
+ if self.group_id.sale_id.payment_status != 'settlement':
+ raise UserError('Uang belum masuk (settlement), mohon konfirmasi ke sales atau finance')
if self.is_internal_use:
stock_move_lines = self.env['stock.move.line'].search([