diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2024-11-11 13:27:04 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2024-11-11 13:27:04 +0700 |
| commit | c8359019759d78dcddea6d419c4a8f8eebe23c69 (patch) | |
| tree | d5a328b9eaaec43e57072bb029eac19c8f93beb9 /indoteknik_custom/models | |
| parent | 3c5b4bbecca6614c0b6f894e41e9551793957b00 (diff) | |
validasi SO harus diisi pada saat create PO di requisition
Diffstat (limited to 'indoteknik_custom/models')
| -rw-r--r-- | indoteknik_custom/models/requisition.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/indoteknik_custom/models/requisition.py b/indoteknik_custom/models/requisition.py index 92b222a8..576857df 100644 --- a/indoteknik_custom/models/requisition.py +++ b/indoteknik_custom/models/requisition.py @@ -35,6 +35,8 @@ class Requisition(models.Model): raise UserError('Tidak ada Lines, belum bisa create PO') if self.is_po: raise UserError('Sudah pernah di create PO') + if self.sale_order_id: + raise UserError('Tidak ada link dengan Sales Order, tidak bisa dihitung sebagai Plafon Qty di PO') vendor_ids = self.env['requisition.line'].read_group([ ('requisition_id', '=', self.id), |
