Merge branch 'feature/质检消息优化' into feature/库存优化_5

This commit is contained in:
yuxianghui
2025-02-25 10:31:00 +08:00
2 changed files with 5 additions and 14 deletions

View File

@@ -713,20 +713,6 @@ class StockPicking(models.Model):
'draft', 'sent']: 'draft', 'sent']:
picking.state = 'waiting' 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') @api.constrains('state', 'move_ids_without_package')
def _check_move_ids_without_package(self): def _check_move_ids_without_package(self):
""" """
@@ -1059,6 +1045,8 @@ class ReStockMove(models.Model):
更新序列号 功能按钮 更新序列号 功能按钮
""" """
self.move_line_nosuggest_ids.unlink() self.move_line_nosuggest_ids.unlink()
if self.state != 'assigned':
self.state = 'assigned'
return self.action_show_details() return self.action_show_details()

View File

@@ -127,6 +127,9 @@
<xpath expr="//field[@name='order_line']/tree/field[@name='product_uom_qty']" position="replace"> <xpath expr="//field[@name='order_line']/tree/field[@name='product_uom_qty']" position="replace">
<field name="product_uom_qty" string="数量" widget="merge_field" optional="show" /> <field name="product_uom_qty" string="数量" widget="merge_field" optional="show" />
</xpath> </xpath>
<xpath expr="//field[@name='order_line']/tree/field[@name='product_uom'][2]" position="attributes">
<attribute name="optional">hide</attribute>
</xpath>
<xpath expr="//field[@name='order_line']/tree/field[@name='product_uom']" position="attributes"> <xpath expr="//field[@name='order_line']/tree/field[@name='product_uom']" position="attributes">
<attribute name="optional">hide</attribute> <attribute name="optional">hide</attribute>
</xpath> </xpath>