diff --git a/odex25_purchase/purchase_requisition_custom/models/purchase_order.py b/odex25_purchase/purchase_requisition_custom/models/purchase_order.py index 57b7af17f..8e0f5cc30 100644 --- a/odex25_purchase/purchase_requisition_custom/models/purchase_order.py +++ b/odex25_purchase/purchase_requisition_custom/models/purchase_order.py @@ -475,16 +475,16 @@ class PurchaseOrderCustom(models.Model): lambda x: x.crossovered_budget_id.state == 'done' and fields.Date.from_string(x.date_from) <= fields.Date.from_string( - self.date_order) <= fields.Date.from_string(x.date_to)) + order.date_order) <= fields.Date.from_string(x.date_to)) amount = budget_lines.purchase_remain amount += line.price_subtotal budget_lines.write({'purchase_remain': amount}) budget_lines.write({'reserve': abs(line.price_subtotal - budget_lines.reserve)}) if order.requisition_id.id: - self.requisition_id.state = 'done' + order.requisition_id.state = 'done' if order.request_id: - self.request_id.write({'state': 'done'}) + order.request_id.write({'state': 'done'}) return True