Add Sefere Basla button and fix GPS cache issue

This commit is contained in:
cerenX9
2026-07-23 20:00:04 +03:00
parent 19694eb461
commit 301285153d
43 changed files with 1912 additions and 2659 deletions

View File

@@ -0,0 +1,31 @@
import os
def fix_files():
for root, dirs, files in os.walk('.'):
if '.git' in root or '__pycache__' in root:
continue
for file in files:
if file.endswith(('.xml', '.csv', '.py', '.js')):
filepath = os.path.join(root, file)
try:
with open(filepath, 'r', encoding='utf-8') as f:
content = f.read()
if 'group_fleet_user_v2' in content or 'group_fleet_manager_v2' in content:
# In CSV, we want to replace the exact strings with the fully qualified ones
if file == 'ir.model.access.csv':
content = content.replace('group_fleet_user_v2', 'mymach_fleet_intelligence.group_fleet_user_v2')
content = content.replace('group_fleet_manager_v2', 'mymach_fleet_intelligence.group_fleet_manager_v2')
else:
# In XML/PY/JS, if it already has mymach_fleet_intelligence. it will become mymach_fleet_intelligence.group_fleet_user_v2
content = content.replace('group_fleet_user_v2', 'group_fleet_user_v2')
content = content.replace('group_fleet_manager_v2', 'group_fleet_manager_v2')
with open(filepath, 'w', encoding='utf-8', newline='\n') as f:
f.write(content)
print(f"Fixed: {filepath}")
except Exception as e:
print(f"Error processing {filepath}: {e}")
if __name__ == '__main__':
fix_files()