diff options
| author | Indoteknik . <it@fixcomart.co.id> | 2025-07-28 12:56:06 +0700 |
|---|---|---|
| committer | Indoteknik . <it@fixcomart.co.id> | 2025-07-28 12:56:06 +0700 |
| commit | 9606b73b33a01291ecbcb9154e32212ba5692bdb (patch) | |
| tree | 8b3152bd099e55f5dcea0988911b351550af342f /indoteknik_custom/models | |
| parent | 9eb74d5978a1d18c3374dbc0b4358bd189cfc8e9 (diff) | |
(andri) fix status done not realized
Diffstat (limited to 'indoteknik_custom/models')
| -rw-r--r-- | indoteknik_custom/models/down_payment.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/indoteknik_custom/models/down_payment.py b/indoteknik_custom/models/down_payment.py index 04dfbbc4..7889ac53 100644 --- a/indoteknik_custom/models/down_payment.py +++ b/indoteknik_custom/models/down_payment.py @@ -541,6 +541,8 @@ class RealizationDownPayment(models.Model): ('done_realized', 'Done Realized') ], string='Status Realisasi', tracking=3, default='remaining') + date_done_not_realized = fields.Date(string='Tanggal Done Not Realized', tracking=3) + currency_id = fields.Many2one( 'res.currency', string='Currency', default=lambda self: self.env.company.currency_id @@ -617,6 +619,7 @@ class RealizationDownPayment(models.Model): if self.done_status == 'remaining': self.done_status = 'done_not_realized' + self.date_done_not_realized = fields.Date.today() elif self.done_status == 'done_not_realized': self.done_status = 'done_realized' else: @@ -650,7 +653,7 @@ class RealizationDownPayment(models.Model): account_uang_muka = 403 # Tanggal pakai create_date atau hari ini - account_date = self.create_date.date() if self.create_date else fields.Date.today() + account_date = self.date_done_not_realized ref_label = f"Realisasi {self.pum_id.number} Biaya {self.pum_id.detail_note} ({cab_move.name})" @@ -768,6 +771,7 @@ class RealizationDownPayment(models.Model): rec.date_approved_pimpinan = now rec.position_pimpinan = 'Pimpinan' rec.status = 'approved' + rec.done_status = 'done_not_realized' # Set status done untuk realisasi rec.message_post( body=f"Approval <b>Pimpinan</b> oleh <b>{self.env.user.name}</b> " |
