连接跳转

This commit is contained in:
guanhuan
2024-09-24 16:23:45 +08:00
parent b986dd8473
commit 7a8753408b
2 changed files with 9 additions and 4 deletions

View File

@@ -22,9 +22,12 @@ class SFMessageWork(models.Model):
[('product_id', '=', mrp_workorder_line.product_id.id), ('state', '=', 'ready'),
('routing_type', '=', '装夹预调')])
if len(mrp_workorder_list) > 0 and mrp_workorder_line.product_id.id not in product_id:
url = message_queue_id.message_template_id.get_url(int(message_queue_id.res_id)) + "&active_id=1"
content = content.replace('{{product_id}}', mrp_workorder_line.product_id.name).replace(
'{{number}}', str(len(mrp_workorder_list))).replace(
'{{part_number}}', mrp_workorder_line.part_number if mrp_workorder_line.part_number else "")
'{{part_number}}',
mrp_workorder_line.part_number if mrp_workorder_line.part_number else "").replace(
'{{request_url}}', url)
product_id.append(mrp_workorder_line.product_id.id)
contents.append(content)
return contents