Merge branch 'refs/heads/develop' into feature/tool_standard_library_process

# Conflicts:
#	sf_manufacturing/models/product_template.py
This commit is contained in:
liaodanlong
2025-03-26 17:01:13 +08:00
20 changed files with 256 additions and 114 deletions

View File

@@ -564,6 +564,18 @@ class StockPicking(models.Model):
sale_order_id = fields.Many2one('sale.order', '销售单号', compute='_compute_move_ids', store=True)
picking_type_sequence_code = fields.Char(related='picking_type_id.sequence_code')
part_numbers = fields.Char(string="零件图号", compute='_compute_part_info', store=True, index=True)
part_names = fields.Char(string="零件名称", compute='_compute_part_info', store=True, index=True)
@api.depends('move_ids_without_package.part_number', 'move_ids_without_package.part_name')
def _compute_part_info(self):
for picking in self:
# 聚合所有关联行的 part_number 和 part_name
part_numbers = picking.move_ids_without_package.mapped('part_number')
part_names = picking.move_ids_without_package.mapped('part_name')
picking.part_numbers = ','.join(filter(None, part_numbers))
picking.part_names = ','.join(filter(None, part_names))
@api.depends('move_ids', 'move_ids.product_id')
def _compute_move_ids(self):
for item in self: