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