diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-01-09 10:23:14 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-01-09 10:23:14 +0700 |
| commit | 59193e57d5645e5c92e231131ca33586f1075559 (patch) | |
| tree | 00d488c1e2bc1e32946dedc32776647f100dda68 | |
| parent | 8d315f204ef81d92c11dfcc60f40f1ab2eceb193 (diff) | |
validasi gudang pada saat SO
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 3f6f5032..e7b28c6d 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -188,6 +188,8 @@ class SaleOrder(models.Model): # raise UserError("Bisa langsung Confirm") self.check_due() for order in self: + if order.warehouse_id.id != 8: #GD Bandengan + raise UserError('Gudang harus Bandengan') if order.state == 'cancel' or order.state == 'done' or order.state == 'sale': raise UserError("Status harus draft atau sent") if order.partner_id.parent_id: |
