diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-01-16 15:49:53 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-01-16 15:49:53 +0700 |
| commit | f6ff283a44e321f63822dbb2d302d3f3cb07baf5 (patch) | |
| tree | ced2674b3ff3a8d4ad44c17537289b5313fdd70c | |
| parent | 40b0e30d359c917b6b22f6fb385a23026a7393bd (diff) | |
<iman> update pengajuan tempo dan tambah cek kredit limit
4 files changed, 4 insertions, 1 deletions
diff --git a/indoteknik_custom/models/account_move_due_extension.py b/indoteknik_custom/models/account_move_due_extension.py index 6fc58cdd..c48c2372 100644 --- a/indoteknik_custom/models/account_move_due_extension.py +++ b/indoteknik_custom/models/account_move_due_extension.py @@ -90,6 +90,7 @@ class DueExtension(models.Model): return self.order_id._create_approval_notification('Pimpinan') if self.order_id._requires_approval_margin_manager(): + self.order_id.check_credit_limit() self.order_id.approval_status = 'pengajuan1' return self.order_id._create_approval_notification('Sales Manager') diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 7b2d9bf8..48195b77 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -816,6 +816,7 @@ class SaleOrder(models.Model): order.approval_status = 'pengajuan2' return self._create_approval_notification('Pimpinan') elif order._requires_approval_margin_manager(): + self.check_credit_limit() order.approval_status = 'pengajuan1' return self._create_approval_notification('Sales Manager') diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index cd330aeb..0a65ab2d 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -121,6 +121,7 @@ class StockPicking(models.Model): ('cancel', 'Cancelled'), ], string='Status Reserve', readonly=True, tracking=True, help="The current state of the stock picking.") notee = fields.Text(string="Note") + date_done = fields.Date('Date done', String='Effective Date') @api.model def _compute_dokumen_tanda_terima(self): diff --git a/indoteknik_custom/models/user_pengajuan_tempo_request.py b/indoteknik_custom/models/user_pengajuan_tempo_request.py index f5261cd4..b43f56ac 100644 --- a/indoteknik_custom/models/user_pengajuan_tempo_request.py +++ b/indoteknik_custom/models/user_pengajuan_tempo_request.py @@ -332,7 +332,7 @@ class UserPengajuanTempoRequest(models.Model): self.pengajuan_tempo_id.dokumen_tempat_bekerja = self.dokumen_tempat_bekerja @api.onchange('tempo_duration') - def _tempo_duration_change(self, vals): + def _tempo_duration_change(self): for tempo in self: if tempo.env.user.id not in (7, 377, 12182): raise UserError("Durasi tempo hanya bisa di ubah oleh Sales Manager atau Direktur") |
