summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/tukar_guling.py
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-08-06 10:33:25 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-08-06 10:33:25 +0700
commit9fb81ccccb8f2735ac5811d81b644b0ae70c4d8e (patch)
tree96b251ab9b7d6b0de6f74b1b4a189a2aa7be037e /indoteknik_custom/models/tukar_guling.py
parent1db0c2f6148e5c13454cc25e4d4d877756536a4b (diff)
<miqdad> push
Diffstat (limited to 'indoteknik_custom/models/tukar_guling.py')
-rw-r--r--indoteknik_custom/models/tukar_guling.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/indoteknik_custom/models/tukar_guling.py b/indoteknik_custom/models/tukar_guling.py
index d511779e..3091acce 100644
--- a/indoteknik_custom/models/tukar_guling.py
+++ b/indoteknik_custom/models/tukar_guling.py
@@ -320,17 +320,17 @@ class TukarGuling(models.Model):
# ('state', '!=', 'cancel')
# ]) > 0
- def _check_invoice_on_revisi_so(self):
- for record in self:
- if record.return_type == 'revisi_so' and record.origin:
- invoices = self.env['account.move'].search([
- ('invoice_origin', 'ilike', record.origin),
- ('state', 'not in', ['draft', 'cancel'])
- ])
- if invoices:
- raise ValidationError(
- _("Tidak bisa memilih Return Type 'Revisi SO' karena dokumen %s sudah dibuat invoice.") % record.origin
- )
+ # def _check_invoice_on_revisi_so(self):
+ # for record in self:
+ # if record.return_type == 'revisi_so' and record.origin:
+ # invoices = self.env['account.move'].search([
+ # ('invoice_origin', 'ilike', record.origin),
+ # ('state', 'not in', ['draft', 'cancel'])
+ # ])
+ # if invoices:
+ # raise ValidationError(
+ # _("Tidak bisa memilih Return Type 'Revisi SO' karena dokumen %s sudah dibuat invoice.") % record.origin
+ # )
@api.model
def create(self, vals):
@@ -577,7 +577,7 @@ class TukarGuling(models.Model):
elif rec.state == 'approval_finance':
if not rec.env.user.has_group('indoteknik_custom.group_role_fat'):
raise UserError("Hanya Finance Manager yang boleh approve tahap ini.")
- rec._check_invoice_on_revisi_so()
+ # rec._check_invoice_on_revisi_so()
rec.set_opt()
rec.state = 'approval_logistic'
rec.date_finance = now