fix
This commit is contained in:
parent
0ed137f53b
commit
259bd3958f
|
|
@ -306,6 +306,12 @@ class PurchaseOrderCustom(models.Model):
|
|||
self.state = 'sent'
|
||||
return res
|
||||
|
||||
@api.returns('mail.message', lambda value: value.id)
|
||||
def message_post(self, **kwargs):
|
||||
if self.env.context.get('mark_rfq_as_sent'):
|
||||
self.filtered(lambda o: o.state == 'wait').write({'state': 'sent'})
|
||||
return super(PurchaseOrderCustom, self.with_context(mail_post_autofollow=True)).message_post(**kwargs)
|
||||
|
||||
def action_approve_po(self):
|
||||
for rec in self:
|
||||
if rec.requisition_id and rec.requisition_id.state != 'approve':
|
||||
|
|
|
|||
Loading…
Reference in New Issue