summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-08-04 15:05:50 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-08-04 15:05:50 +0700
commit569fd1188a36aa97f0681bffe650dcbb9215f504 (patch)
treef245445e00bd7fc4e3c7f68fd4c0dc1db896671b
parent8386a9affb5e17b09ba76702f7fb01f070a5f713 (diff)
<miqdad> remove vendor bill val
-rw-r--r--indoteknik_custom/models/tukar_guling_po.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/indoteknik_custom/models/tukar_guling_po.py b/indoteknik_custom/models/tukar_guling_po.py
index 21f973a2..467fff44 100644
--- a/indoteknik_custom/models/tukar_guling_po.py
+++ b/indoteknik_custom/models/tukar_guling_po.py
@@ -74,19 +74,19 @@ class TukarGulingPO(models.Model):
return res
- @api.constrains('return_type', 'operations')
- def _check_bill_on_revisi_po(self):
- for record in self:
- if record.return_type == 'revisi_po' and record.origin:
- bills = self.env['account.move'].search([
- ('invoice_origin', 'ilike', record.origin),
- ('move_type', '=', 'in_invoice'), # hanya vendor bill
- ('state', 'not in', ['draft', 'cancel'])
- ])
- if bills:
- raise ValidationError(
- _("Tidak bisa memilih Return Type 'Revisi PO' karena PO %s sudah dibuat vendor bill.") % record.origin
- )
+ # @api.constrains('return_type', 'operations')
+ # def _check_bill_on_revisi_po(self):
+ # for record in self:
+ # if record.return_type == 'revisi_po' and record.origin:
+ # bills = self.env['account.move'].search([
+ # ('invoice_origin', 'ilike', record.origin),
+ # ('move_type', '=', 'in_invoice'), # hanya vendor bill
+ # ('state', 'not in', ['draft', 'cancel'])
+ # ])
+ # if bills:
+ # raise ValidationError(
+ # _("Tidak bisa memilih Return Type 'Revisi PO' karena PO %s sudah dibuat vendor bill.") % record.origin
+ # )
@api.onchange('operations')
def _onchange_operations(self):