From 0d7f34819461e9b583ea5fb912673d426705fd6d Mon Sep 17 00:00:00 2001 From: guanhuan Date: Fri, 7 Mar 2025 11:29:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=8B=A8=E5=88=97=E8=A1=A8=E9=87=87?= =?UTF-8?q?=E8=B4=AD=E8=AE=A2=E5=8D=95=E8=AF=A2=E4=BB=B7=E5=8D=95=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../models/models.py | 2 +- sf_manufacturing/views/stock_picking_view.xml | 10 +++++++ sf_sale/views/purchase_order_view.xml | 28 +++++++++++-------- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/jikimo_purchase_tier_validation/models/models.py b/jikimo_purchase_tier_validation/models/models.py index 4462e962..ecb7ed73 100644 --- a/jikimo_purchase_tier_validation/models/models.py +++ b/jikimo_purchase_tier_validation/models/models.py @@ -23,7 +23,7 @@ class jikimo_purchase_tier_validation(models.Model): def button_confirm(self): for record in self: - if record.state in ['to approve']: + if record.need_validation and not record.validation_status == 'validated': raise ValidationError(_('请先完成审批。')) res = super(jikimo_purchase_tier_validation, self).button_confirm() for record in self: diff --git a/sf_manufacturing/views/stock_picking_view.xml b/sf_manufacturing/views/stock_picking_view.xml index 458494b9..3cb877a9 100644 --- a/sf_manufacturing/views/stock_picking_view.xml +++ b/sf_manufacturing/views/stock_picking_view.xml @@ -67,6 +67,16 @@ + + + + diff --git a/sf_sale/views/purchase_order_view.xml b/sf_sale/views/purchase_order_view.xml index 209fd4fa..6624c7fa 100644 --- a/sf_sale/views/purchase_order_view.xml +++ b/sf_sale/views/purchase_order_view.xml @@ -42,20 +42,20 @@ - -