summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMqdd <ahmadmiqdad27@gmail.com>2026-03-14 14:55:20 +0700
committerMqdd <ahmadmiqdad27@gmail.com>2026-03-14 14:55:20 +0700
commit61c04d23a90e1c0a90b6d92adc856c8f1e925eb4 (patch)
tree2c5768e65f6f343661de215e8f8b5443e06c5e4a
parent8289cee1b6a599eaa7c07494bc8bef3d90fe7f0b (diff)
<Miqqdad>bsc_finance
-rw-r--r--indoteknik_custom/models/upah_harian_office.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/indoteknik_custom/models/upah_harian_office.py b/indoteknik_custom/models/upah_harian_office.py
index bdbb3cc4..1fa535c4 100644
--- a/indoteknik_custom/models/upah_harian_office.py
+++ b/indoteknik_custom/models/upah_harian_office.py
@@ -168,18 +168,40 @@ class UpahHarian(models.Model):
if self.state == 'draft':
self.state = 'pic'
+ return {
+ 'effect': {
+ 'fadeout': 'slow',
+ 'type': 'rainbow_man',
+ 'message': 'Berhasil Submit',
+ }
+ }
elif self.state == 'pic':
if not self.env.user.pic:
raise UserError("Only PIC user can approve this document.")
self.state = 'dept'
self.approved_by_pic = approver
self.date_approved_pic = fields.Datetime.now()
+ return {
+ 'effect': {
+ 'fadeout': 'slow',
+ 'type': 'rainbow_man',
+ 'message': 'Berhasil Approve',
+ }
+ }
elif self.state == 'dept':
if self.env.user.id not in dept_head_ids:
raise UserError("Harus di Approve kepala departemen")
self.state = 'waiting_payment'
self.approved_by_dept = approver
self.date_approved_dept = fields.Datetime.now()
+ return {
+ 'effect': {
+ 'fadeout': 'slow',
+ 'type': 'rainbow_man',
+ 'message': 'Berhasil approve',
+ }
+ }
+
def action_reset_to_draft(self):