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)}" +