Metatron_Student_ERP/fix_state.py

11 lines
304 B
Python

import re
with open('addons/education_lms/security/security.xml', 'r') as f:
text = f.read()
# Replace state check
text = text.replace("('state', 'in', ['published', 'closed']),", "('state', '=', 'published'),")
with open('addons/education_lms/security/security.xml', 'w') as f:
f.write(text)