add some fixes

This commit is contained in:
eslamabady 2024-07-24 13:15:42 +03:00
parent 57a0901ad5
commit a7a266cdc8
1 changed files with 3 additions and 3 deletions

View File

@ -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