You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
762 B

  1. import frappe
  2. def execute():
  3. frappe.reload_doc("core", "doctype", "communication")
  4. frappe.reload_doc("core", "doctype", "activity_log")
  5. frappe.db.sql("""insert into `tabActivity Log` (name, owner, modified, creation, status, communication_date,
  6. reference_doctype, reference_name, timeline_doctype, timeline_name, link_doctype, link_name, subject, content, user)
  7. select name, owner, modified, creation, status, communication_date,
  8. reference_doctype, reference_name, timeline_doctype, timeline_name, link_doctype, link_name, subject, content, user
  9. from `tabCommunication`
  10. where comment_type = 'Updated'""")
  11. frappe.db.sql("""delete from `tabCommunication` where comment_type = 'Updated'""")
  12. frappe.delete_doc("DocType", "Authentication Log")