From 4cf52739d7f249b76401f1b3a31e5096a9a073a7 Mon Sep 17 00:00:00 2001 From: Abdurrahman Saber Date: Thu, 2 Oct 2025 12:50:28 +0300 Subject: [PATCH] [IMP] purchase_requisition_custom: update orde report & precompute is_purchase_budget --- .../models/purchase_requisition_custom.py | 2 +- .../views/purchase_order.xml | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/odex25_purchase/purchase_requisition_custom/models/purchase_requisition_custom.py b/odex25_purchase/purchase_requisition_custom/models/purchase_requisition_custom.py index a758c1d8d..b139a6562 100644 --- a/odex25_purchase/purchase_requisition_custom/models/purchase_requisition_custom.py +++ b/odex25_purchase/purchase_requisition_custom/models/purchase_requisition_custom.py @@ -109,7 +109,7 @@ class PurchaseRequisitionCustom(models.Model): [('department', 'Department'), ('default', 'Default Cost Center'), ('product_line', 'Product Line'), ('project', 'Project')], string='Purchase Cost', default='department') selected_purchase_id = fields.Many2one("purchase.order", compute="_compute_selected_purchase_order") - is_purchase_budget = fields.Boolean(string="Is Purchase Budget", compute='_compute_purchase_budget') + is_purchase_budget = fields.Boolean(string="Is Purchase Budget", compute='_compute_purchase_budget', default=lambda self: self.env.company.purchase_budget) type_id_test = fields.Many2one('purchase.requisition.type', string="Agreement Type") Project_name = fields.Char(string='Project name') Chair_number = fields.Char(string='Chair number') diff --git a/odex25_purchase/purchase_requisition_custom/views/purchase_order.xml b/odex25_purchase/purchase_requisition_custom/views/purchase_order.xml index ccd2943ba..cc1f8e277 100644 --- a/odex25_purchase/purchase_requisition_custom/views/purchase_order.xml +++ b/odex25_purchase/purchase_requisition_custom/views/purchase_order.xml @@ -13,4 +13,26 @@ + + + +