diff --git a/l10n_uy_currency_update/__manifest__.py b/l10n_uy_currency_update/__manifest__.py index 3bda35cb..585b38f8 100644 --- a/l10n_uy_currency_update/__manifest__.py +++ b/l10n_uy_currency_update/__manifest__.py @@ -19,7 +19,7 @@ ############################################################################## { 'name': 'Uruguayan Currency Rate Update', - 'version': "18.0.1.0.0", + 'version': "18.0.1.1.0", 'countries': ['uy'], 'category': 'Localization/Uruguay', 'sequence': 14, diff --git a/l10n_uy_currency_update/models/res_currency.py b/l10n_uy_currency_update/models/res_currency.py index 2977dac3..feb5ed5a 100644 --- a/l10n_uy_currency_update/models/res_currency.py +++ b/l10n_uy_currency_update/models/res_currency.py @@ -28,9 +28,13 @@ def _compute_l10n_uy_bcu_have_code(self): def action_l10n_uy_get_bcu_rate(self): self.ensure_one() + wsdl = "https://cotizaciones.bcu.gub.uy/wscotizaciones/servlet/%s/service.asmx?WSDL" + date_api_client = Client(wsdl % 'awsultimocierre') + last_closing_date = date_api_client.service.Execute() rate = self.env['res.company']._parse_bcu_data(self) + if rate: - raise UserError(_('Fecha Ultimo Cierre: %s\nRate: %s' % (rate[self.name][1], rate[self.name][0]))) + raise UserError(_('Fecha Ultimo Cierre: %s\nRate: %s' % (last_closing_date, 1 / rate[self.name][0]))) else: raise UserError(_('No se encontro cotizacion para esta Moneda')) diff --git a/l10n_uy_currency_update/views/res_currency_views.xml b/l10n_uy_currency_update/views/res_currency_views.xml index 1805b11e..c0498d99 100644 --- a/l10n_uy_currency_update/views/res_currency_views.xml +++ b/l10n_uy_currency_update/views/res_currency_views.xml @@ -9,8 +9,8 @@
-