diff options
| author | FIN-IT_AndriFP <it@fixcomart.co.id> | 2025-10-17 15:46:46 +0700 |
|---|---|---|
| committer | FIN-IT_AndriFP <it@fixcomart.co.id> | 2025-10-17 15:46:46 +0700 |
| commit | e7707d60252b5e026b64597fc66cf867fa8d3a70 (patch) | |
| tree | 0970710a30fa6b30d6d8df44f15c309952143dfd | |
| parent | 2cd0d5ede34e2c46b3bcd1f1907cd0526ef42b9d (diff) | |
| parent | a850dd693d4342181cfe4ca15fcd5ff4a528dcc4 (diff) | |
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into odoo-backup
| -rw-r--r-- | indoteknik_custom/models/commision.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/indoteknik_custom/models/commision.py b/indoteknik_custom/models/commision.py index 6d538b83..a937e2d0 100644 --- a/indoteknik_custom/models/commision.py +++ b/indoteknik_custom/models/commision.py @@ -428,22 +428,22 @@ class CustomerCommision(models.Model): if not self.status or self.status == 'draft': self.status = 'pengajuan1' - elif self.status == 'pengajuan1' and self.env.user.id == 19: + elif self.status == 'pengajuan1' and (self.env.user.id == 19 or self.env.user.has_group('indoteknik_custom.group_role_it')): self.status = 'pengajuan2' self.approved_by = (self.approved_by + ', ' if self.approved_by else '') + self.env.user.name self.date_approved_sales = now_naive self.position_sales = 'Sales Manager' - elif self.status == 'pengajuan2' and self.env.user.id == 216: + elif self.status == 'pengajuan2' and (self.env.user.id == 216 or self.env.user.has_group('indoteknik_custom.group_role_it')): self.status = 'pengajuan3' self.approved_by = (self.approved_by + ', ' if self.approved_by else '') + self.env.user.name self.date_approved_marketing = now_naive self.position_marketing = 'Marketing Manager' - elif self.status == 'pengajuan3' and self.env.user.is_leader: + elif self.status == 'pengajuan3' and (self.env.user.is_leader or self.env.user.has_group('indoteknik_custom.group_role_it')): self.status = 'pengajuan4' self.approved_by = (self.approved_by + ', ' if self.approved_by else '') + self.env.user.name self.date_approved_pimpinan = now_naive self.position_pimpinan = 'Pimpinan' - elif self.status == 'pengajuan4' and self.env.user.id == 1272: + elif self.status == 'pengajuan4' and (self.env.user.id == 1272 or self.env.user.has_group('indoteknik_custom.group_role_it')): for line in self.commision_lines: line.invoice_id.is_customer_commision = True if self.commision_type == 'fee': |
