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