diff options
| author | FIN-IT_AndriFP <it@fixcomart.co.id> | 2025-10-02 14:04:56 +0700 |
|---|---|---|
| committer | FIN-IT_AndriFP <it@fixcomart.co.id> | 2025-10-02 14:04:56 +0700 |
| commit | 7d89516ce05d0ea67733c04436cc2de544189efe (patch) | |
| tree | 2521fbf09f4695253fd7db1ff7613b7f003f20ea /indoteknik_custom/models/approval_payment_term.py | |
| parent | 10da5e27e658030f171f694d6696f93e4a472447 (diff) | |
| parent | 875b20796c7fa64abebe430b2707df597e29836b (diff) | |
Merge branch 'pum-v2' of https://bitbucket.org/altafixco/indoteknik-addons into pum-v2
Diffstat (limited to 'indoteknik_custom/models/approval_payment_term.py')
| -rw-r--r-- | indoteknik_custom/models/approval_payment_term.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/indoteknik_custom/models/approval_payment_term.py b/indoteknik_custom/models/approval_payment_term.py index 8618856a..449bd90b 100644 --- a/indoteknik_custom/models/approval_payment_term.py +++ b/indoteknik_custom/models/approval_payment_term.py @@ -69,8 +69,8 @@ class ApprovalPaymentTerm(models.Model): return res def _track_changes_for_user_688(self, vals, old_values_dict): - if self.env.user.id != 688: - return + # if self.env.user.id != 688: + # return tracked_fields = {"blocking_stage", "warning_stage", "property_payment_term_id"} @@ -106,7 +106,8 @@ class ApprovalPaymentTerm(models.Model): if changes: timestamp = fields.Datetime.now().strftime('%Y-%m-%d %H:%M:%S') - rec.change_log_688 = f"{timestamp} - Perubahan oleh Widya:\n" + "\n".join(changes) + user = self.env.user + rec.change_log_688 = f"{timestamp} - Perubahan oleh {user.name}:\n" + "\n".join(changes) @staticmethod @@ -171,7 +172,8 @@ class ApprovalPaymentTerm(models.Model): 'blocking_stage': self.blocking_stage, 'warning_stage': self.warning_stage, 'active_limit': self.active_limit, - 'property_payment_term_id': self.property_payment_term_id.id + 'property_payment_term_id': self.property_payment_term_id.id, + 'is_cbd_locked': False, }) self.approve_date = datetime.utcnow() self.state = 'approved' |
