This commit is contained in:
mohammed-alkhazrji 2025-12-15 23:44:18 +03:00
parent 10198069ca
commit 3e4b762227
1 changed files with 10 additions and 5 deletions

View File

@ -328,12 +328,17 @@ class AnnualPurchaseRequest(models.Model):
return self._open_reason_wizard('manager_reject')
def action_send_to_committee(self):
if self.rfq_count > 0:
self.write({'sent_to_commitee': True})
self.write({'state': 'committee'})
for rec in self:
if rec.rfq_count > 0:
rec.write({
'sent_to_commitee': True,
'state': 'committee'
})
rec.rfq_ids.write({'state': 'committee'})
else:
raise UserError("لا يمكن الإرسال إلى اللجنة لأن عدد RFQs يساوي صفر.")
def action_send_to_ssd(self):
self.write({'state':'ssd'})