Add manual sync endpoint
This commit is contained in:
@@ -240,3 +240,11 @@ class MymachFleetController(http.Controller):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
return f"ERROR: {str(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)}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user