From 4d9a7f48000f3dc5db3fbeb69ca108727d556c8c Mon Sep 17 00:00:00 2001 From: cerenX9 Date: Fri, 24 Jul 2026 14:15:54 +0300 Subject: [PATCH] Add manual sync endpoint --- addons/mymach_fleet_intelligence/controllers/main.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addons/mymach_fleet_intelligence/controllers/main.py b/addons/mymach_fleet_intelligence/controllers/main.py index 51c3eb6..d431f74 100644 --- a/addons/mymach_fleet_intelligence/controllers/main.py +++ b/addons/mymach_fleet_intelligence/controllers/main.py @@ -240,3 +240,11 @@ class MymachFleetController(http.Controller): except Exception as e: return f"ERROR: {str(e)}" + @http.route('/mymach/sync_now', type='http', auth='public', csrf=False) + def force_google_sync(self, **kwargs): + try: + request.env['mymach.fleet.google.sync'].sudo().sync_google_locations() + return "GOOGLE SYNC TETIKLENDI! Lutfen Odoo Haritayi yenileyin." + except Exception as e: + return f"GOOGLE SYNC HATASI: {str(e)}" +