[FIX] purchase_requisition_custom
This commit is contained in:
parent
80386ed678
commit
1a2a033d06
|
|
@ -56,7 +56,7 @@ class BudgetConfirmationCustom(models.Model):
|
|||
amount += line.amount
|
||||
budget_lines.write({'reserve': amount})
|
||||
|
||||
if self.po_id.requisition_id:
|
||||
if self.po_id.requisition_id and self.po_id.requisition_type_exclusive == 'exclusive':
|
||||
self.po_id.requisition_id.write({'state': 'checked'})
|
||||
if self.po_id:
|
||||
self.po_id.write({'state': 'to approve'})
|
||||
|
|
|
|||
|
|
@ -94,6 +94,10 @@ class PurchaseRequisitionCustom(models.Model):
|
|||
type_exclusive = fields.Selection(related='type_id.exclusive')
|
||||
|
||||
|
||||
def write(self, vals):
|
||||
res = super(PurchaseRequisitionCustom, self).write(vals)
|
||||
return res
|
||||
|
||||
def get_attachments(self):
|
||||
# Check if multiple records are passed, and handle them in a loop
|
||||
if len(self) > 1:
|
||||
|
|
|
|||
Loading…
Reference in New Issue