From ed768ea38e24fb500ddbf1c9b860dbffdc60fb79 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Mon, 20 Apr 2026 09:55:36 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
yuthon_hr_attendance/views/vacation_overtime_active_views.xml | 4 ++--
yuthon_purchase/models/inherit_purchase_order.py | 1 +
yuthon_purchase/views/inherit_purchase_order_views.xml | 1 +
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/yuthon_hr_attendance/views/vacation_overtime_active_views.xml b/yuthon_hr_attendance/views/vacation_overtime_active_views.xml
index 7014495a5..8431e2279 100644
--- a/yuthon_hr_attendance/views/vacation_overtime_active_views.xml
+++ b/yuthon_hr_attendance/views/vacation_overtime_active_views.xml
@@ -6,7 +6,7 @@
@@ -22,7 +22,7 @@
-
+
diff --git a/yuthon_purchase/models/inherit_purchase_order.py b/yuthon_purchase/models/inherit_purchase_order.py
index 7a48da19a..9d9ebcd6e 100644
--- a/yuthon_purchase/models/inherit_purchase_order.py
+++ b/yuthon_purchase/models/inherit_purchase_order.py
@@ -36,6 +36,7 @@ class InheritPurchaseOrder(models.Model):
default=lambda self: [(6, 0, [self.env.user.id])])
pay_way = fields.Selection([('onetime', '一次性'), ('installment', '分期')], string="付款方式", default='onetime')
reason_text = fields.Text(string="申请事由")
+ is_modify = fields.Boolean(string="可修改")
pay_line_ids = fields.One2many('purchase.order.pay.line', 'order_id', string="付款详情")
is_company = fields.Boolean(string="本公司", default=True, compute='_compute_is_company',search='_search_part_of_company')
diff --git a/yuthon_purchase/views/inherit_purchase_order_views.xml b/yuthon_purchase/views/inherit_purchase_order_views.xml
index fea677807..92972a2a4 100644
--- a/yuthon_purchase/views/inherit_purchase_order_views.xml
+++ b/yuthon_purchase/views/inherit_purchase_order_views.xml
@@ -121,6 +121,7 @@
+
From db31869df1b5c1aaf343120d5cf73aa4908ff284 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Mon, 20 Apr 2026 10:10:30 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
soong_workflow/models/soong_workflow_mixin.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/soong_workflow/models/soong_workflow_mixin.py b/soong_workflow/models/soong_workflow_mixin.py
index 79ab64c87..522e6ab86 100644
--- a/soong_workflow/models/soong_workflow_mixin.py
+++ b/soong_workflow/models/soong_workflow_mixin.py
@@ -1437,7 +1437,10 @@ class SoongWorkflowMixin(models.AbstractModel):
id_el = etree.Element("field")
id_el.set("name", "log_ids")
id_el.set("invisible", "1")
- if readonly_arr:
+ if self._name == "purchase.order":
+ # 采购订单模型:不添加 is_modify 条件
+ field_inst.set("readonly", "state in %s" % readonly_arr)
+ else:
field_inst.set("readonly", "(state in %s) and (is_modify != True)" % readonly_arr)
# if required_arr:
# field_inst.set("required", "state in %s" % required_arr)