tr5
This commit is contained in:
parent
10198069ca
commit
3e4b762227
|
|
@ -328,12 +328,17 @@ class AnnualPurchaseRequest(models.Model):
|
||||||
return self._open_reason_wizard('manager_reject')
|
return self._open_reason_wizard('manager_reject')
|
||||||
|
|
||||||
def action_send_to_committee(self):
|
def action_send_to_committee(self):
|
||||||
if self.rfq_count > 0:
|
for rec in self:
|
||||||
self.write({'sent_to_commitee': True})
|
if rec.rfq_count > 0:
|
||||||
self.write({'state': 'committee'})
|
rec.write({
|
||||||
else:
|
'sent_to_commitee': True,
|
||||||
raise UserError("لا يمكن الإرسال إلى اللجنة لأن عدد RFQs يساوي صفر.")
|
'state': 'committee'
|
||||||
|
})
|
||||||
|
|
||||||
|
rec.rfq_ids.write({'state': 'committee'})
|
||||||
|
|
||||||
|
else:
|
||||||
|
raise UserError("لا يمكن الإرسال إلى اللجنة لأن عدد RFQs يساوي صفر.")
|
||||||
def action_send_to_ssd(self):
|
def action_send_to_ssd(self):
|
||||||
self.write({'state':'ssd'})
|
self.write({'state':'ssd'})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue