Metatron_Student_ERP/print_debug2.py
2026-09-25 18:00:58 +05:30

15 lines
798 B
Python

import sys
with open('addons/education_lms/tests/test_education_lms.py', 'r') as f:
text = f.read()
text = text.replace(
""" print(f"\\nDEBUG COURSE: p={course_a.program_id.id}, y={course_a.academic_year_id.id}, t={course_a.term_id.id}, b={course_a.batch_id.id}")""",
""" print(f"\\nDEBUG COURSE_A: p={course_a.program_id.id}, y={course_a.academic_year_id.id}, t={course_a.term_id.id}, b={course_a.batch_id.id}, state={course_a.state}")
print(f"DEBUG COURSE_FACULTY_A: p={self.course_faculty_a.program_id.id}, y={self.course_faculty_a.academic_year_id.id}, t={self.course_faculty_a.term_id.id}, b={self.course_faculty_a.batch_id.id}, state={self.course_faculty_a.state}")
"""
)
with open('addons/education_lms/tests/test_education_lms.py', 'w') as f:
f.write(text)