diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-10-06 13:59:19 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-10-06 13:59:19 +0700 |
| commit | 8fe189d8f4caeed4b1aff764abc005b4e4ab3979 (patch) | |
| tree | da71d69bc810143d6c7fb4ffab0810675040eec7 /indoteknik_custom/models | |
| parent | 4603578f08af74760c323aac624ea2ae95252d4b (diff) | |
<Miqdad> change button name and fix wrong validation
Diffstat (limited to 'indoteknik_custom/models')
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 8408cdc4..be0d77ac 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -1338,11 +1338,11 @@ class StockPicking(models.Model): if self.picking_type_id.code == 'incoming' and self.group_id.id == False and self.is_internal_use == False: raise UserError(_('Tidak bisa Validate jika tidak dari Document SO / PO')) - if self.is_internal_use and not self.env.user.is_logistic_approver and self.location_id.id == 57 and self.approval_status == 'pengajuan2': - raise UserError("Harus di Approve oleh Logistik") + # if self.is_internal_use and not self.env.user.is_logistic_approver and self.location_id.id == 57 and self.approval_status == 'pengajuan2': + # raise UserError("Harus di Approve oleh Logistik") - if self.is_internal_use and not self.env.user.is_accounting and self.approval_status == 'pengajuan1' and self.location_id.id == 57: - raise UserError("Harus di Approve oleh Accounting") + if self.is_internal_use and not self.env.user.is_logistic_approver and self.approval_status in ['pengajuan1', 'pengajuan2'] and self.location_id.id == 57: + raise UserError("Harus di Approve oleh Logistik") if self.picking_type_id.id == 28 and not self.env.user.is_logistic_approver: raise UserError("Harus di Approve oleh Logistik") |
