From c924356d9e95d592b6834a6ecc443a598c12530d Mon Sep 17 00:00:00 2001 From: Odoo Translation Bot Date: Sun, 5 May 2019 01:35:12 +0200 Subject: [I18N] Update translation terms from Transifex --- addons/google_account/i18n/de.po | 10 ++++++---- addons/google_account/i18n/hr.po | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'addons/google_account') diff --git a/addons/google_account/i18n/de.po b/addons/google_account/i18n/de.po index 02e6face1f1..6abc5450d06 100644 --- a/addons/google_account/i18n/de.po +++ b/addons/google_account/i18n/de.po @@ -4,13 +4,15 @@ # # Translators: # Martin Trigaux, 2018 +# Chris Egal , 2019 +# msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~11.5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-09-21 13:17+0000\n" -"PO-Revision-Date: 2018-09-21 13:17+0000\n" -"Last-Translator: Martin Trigaux, 2018\n" +"PO-Revision-Date: 2018-08-24 09:18+0000\n" +"Last-Translator: Chris Egal , 2019\n" "Language-Team: German (https://www.transifex.com/odoo/teams/41243/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -36,7 +38,7 @@ msgstr "Anzeigename" #. module: google_account #: model:ir.model,name:google_account.model_google_service msgid "Google Service" -msgstr "" +msgstr "Google Service" #. module: google_account #: model:ir.model.fields,field_description:google_account.field_google_service__id @@ -105,4 +107,4 @@ msgstr "Etwas ging schief mit Ihrer Anfrage an Google" #: code:addons/google_account/models/google_service.py:131 #, python-format msgid "The account for the Google service '%s' is not configured." -msgstr "" +msgstr "Der Benutzer für den Google Service '%s' ist nicht konfiguriert." diff --git a/addons/google_account/i18n/hr.po b/addons/google_account/i18n/hr.po index 88a2d5742ed..dbc7046d98a 100644 --- a/addons/google_account/i18n/hr.po +++ b/addons/google_account/i18n/hr.po @@ -3,8 +3,8 @@ # * google_account # # Translators: -# Bole , 2019 # Đurđica Žarković , 2019 +# Bole , 2019 # msgid "" msgstr "" @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-09-21 13:17+0000\n" "PO-Revision-Date: 2018-08-24 09:18+0000\n" -"Last-Translator: Đurđica Žarković , 2019\n" +"Last-Translator: Bole , 2019\n" "Language-Team: Croatian (https://www.transifex.com/odoo/teams/41243/hr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -38,7 +38,7 @@ msgstr "Naziv za prikaz" #. module: google_account #: model:ir.model,name:google_account.model_google_service msgid "Google Service" -msgstr "" +msgstr "Google Servis" #. module: google_account #: model:ir.model.fields,field_description:google_account.field_google_service__id -- cgit v1.2.3 From da13c704845ff5b44b8d5075960287b57b8de14f Mon Sep 17 00:00:00 2001 From: Julien Castiaux Date: Tue, 30 Apr 2019 14:38:25 +0000 Subject: [FIX] google_account: error type on wrong request Configure google to be synchronized with Odoo, create a contact with a wrong email address (I used `foo@.test.`), create an event in the calendar, add the contact as attendee, sync with google. Traceback. The traceback is a `request.exception.HTTPError` reraise by `_do_request` in the `google.service` model on several HTTP errors, 400 amoung them. The real error is "Invalid attendee email." but the information is lost in the error message. The error hanlding has been rethink so it raise a user friendly error via the UserError modal with just the error message sent by the Google API. The logged error has been rethink to pretty print both the request and the response. opw-1974295 closes odoo/odoo#33058 Signed-off-by: Lucas Perais (lpe) --- addons/google_account/models/google_service.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'addons/google_account') diff --git a/addons/google_account/models/google_service.py b/addons/google_account/models/google_service.py index 1797dd66bea..5292a490515 100644 --- a/addons/google_account/models/google_service.py +++ b/addons/google_account/models/google_service.py @@ -2,6 +2,7 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime +from pprint import pformat import json import logging @@ -183,13 +184,16 @@ class GoogleService(models.TransientModel): except: pass except requests.HTTPError as error: + # https://developers.google.com/calendar/v3/errors if error.response.status_code in (204, 404): status = error.response.status_code response = "" else: - _logger.exception("Bad google request : %s !", error.response.content) + req = json.loads(error.request.body) + res = error.response.json() + _logger.exception("Error while requesting Google Services\nRequest:\n%s\nResponse:\n%s", pformat(req), pformat(res)) if error.response.status_code in (400, 401, 410): - raise error + raise UserError(_("Error while requesting Google Services: %s" % res['error']['message'])) raise self.env['res.config.settings'].get_config_warning(_("Something went wrong with your request to google")) return (status, response, ask_time) -- cgit v1.2.3