diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-07-27 10:46:42 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-07-27 10:46:42 +0700 |
| commit | 87a29b3262e0a952882199d4560f820805069d11 (patch) | |
| tree | cc664a73e7aefbe4646b8c67f7a1699e647f94f8 | |
| parent | 091d3159526442a41cc1026a7d54fbf5c2f951f8 (diff) | |
Pastikan produk sementara tidak bisa di approve di SO pada saat ask approval atau confirm
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 552f1b0a..12043996 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -327,7 +327,6 @@ class SaleOrder(models.Model): order.is_warning = False def sale_order_approve(self): - # raise UserError("Bisa langsung Confirm") self.check_due() for order in self: @@ -357,6 +356,8 @@ class SaleOrder(models.Model): if not order.carrier_id: raise UserError("Shipping Method harus diisi") for line in order.order_line: + if line.product_id.id == 385544: + raise UserError('Produk Sementara Tidak Bisa Di Confirm atau Ask Approval') if not line.product_id or line.product_id.type == 'service': continue # must add product can sell validation |
