From 7ecb28382ac3170bb3c1b85f4c5489cc8a716e84 Mon Sep 17 00:00:00 2001
From: yuxianghui <3437689193@qq.com>
Date: Tue, 25 Feb 2025 10:28:51 +0800
Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=BA=93=E5=AD=98=E5=BA=8F=E5=88=97?=
=?UTF-8?q?=E5=8F=B7=E7=9A=84=E6=9B=B4=E6=96=B0=E5=BA=8F=E5=88=97=E5=8F=B7?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=8C=89=E9=92=AE=E4=BC=98=E5=8C=96=EF=BC=9B?=
=?UTF-8?q?2=E3=80=81=E9=94=80=E5=94=AE=E5=8D=95=E9=BB=98=E8=AE=A4?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=AD=97=E6=AE=B5=E4=BC=98=E5=8C=96=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sf_manufacturing/models/stock.py | 16 ++--------------
sf_sale/views/sale_order_view.xml | 3 +++
2 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/sf_manufacturing/models/stock.py b/sf_manufacturing/models/stock.py
index e1cf0ee4..9f5a7733 100644
--- a/sf_manufacturing/models/stock.py
+++ b/sf_manufacturing/models/stock.py
@@ -713,20 +713,6 @@ class StockPicking(models.Model):
'draft', 'sent']:
picking.state = 'waiting'
- # def write(self, vals):
- #
- # old_state = None
- # if 'state' in vals:
- # old_state = self.state
- # res = super(StockPicking, self).write(vals)
- # if (self.picking_type_id.use_existing_lots is False and self.picking_type_id.use_create_lots is True and
- # (('move_ids_without_package' in vals and self.state == 'assigned')
- # or ('state' in vals and vals['state'] == 'assigned' and old_state not in ['assigned', 'done']))):
- # if self.move_ids_without_package:
- # for move_id in self.move_ids_without_package:
- # move_id.action_show_details()
- # return res
-
@api.constrains('state', 'move_ids_without_package')
def _check_move_ids_without_package(self):
"""
@@ -1059,6 +1045,8 @@ class ReStockMove(models.Model):
更新序列号 功能按钮
"""
self.move_line_nosuggest_ids.unlink()
+ if self.state != 'assigned':
+ self.state = 'assigned'
return self.action_show_details()
diff --git a/sf_sale/views/sale_order_view.xml b/sf_sale/views/sale_order_view.xml
index 185050c0..5a6b08de 100644
--- a/sf_sale/views/sale_order_view.xml
+++ b/sf_sale/views/sale_order_view.xml
@@ -127,6 +127,9 @@
+
+ hide
+
hide