1、库存序列号的更新序列号功能按钮优化;2、销售单默认显示字段优化;

This commit is contained in:
yuxianghui
2025-02-25 10:28:51 +08:00
parent ee42b6ae70
commit 7ecb28382a
2 changed files with 5 additions and 14 deletions

View File

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