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

15 lines
533 B
Python

import re
with open('addons/education_lms/tests/test_education_lms.py', 'r') as f:
text = f.read()
text = text.replace(
""" print(f"\\nDEBUG USER GROUPS: {self.user_student_a.groups_id.mapped('name')}")""",
""" rule = self.env.ref('education_lms.rule_lms_course_student')
print(f"\\nDEBUG RULE PERM_READ: {rule.perm_read}")
print(f"DEBUG USER GROUPS: {self.user_student_a.groups_id.mapped('name')}")"""
)
with open('addons/education_lms/tests/test_education_lms.py', 'w') as f:
f.write(text)