mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
Merge pull request #770 from BT-tpiric/7.0-currency_rate_update-admin.ch_service
7.0 currency_rate_update: admin.ch service url change
This commit is contained in:
@@ -448,8 +448,8 @@ class Admin_ch_getter(CurrencyGetterInterface):
|
||||
def get_updated_currency(self, currency_array, main_currency,
|
||||
max_delta_days):
|
||||
"""Implementation of abstract method of Curreny_getter_interface"""
|
||||
url = ('http://www.afd.admin.ch/publicdb/newdb/'
|
||||
'mwst_kurse/wechselkurse.php')
|
||||
url = ('http://www.pwebapps.ezv.admin.ch/apps/rates/rate/'
|
||||
'getxml?activeSearchType=today')
|
||||
# We do not want to update the main currency
|
||||
if main_currency in currency_array:
|
||||
currency_array.remove(main_currency)
|
||||
@@ -460,7 +460,7 @@ class Admin_ch_getter(CurrencyGetterInterface):
|
||||
dom = etree.fromstring(rawfile)
|
||||
_logger.debug("Admin.ch sent a valid XML file")
|
||||
adminch_ns = {
|
||||
'def': 'http://www.afd.admin.ch/publicdb/newdb/mwst_kurse'
|
||||
'def': 'http://www.pwebapps.ezv.admin.ch/apps/rates'
|
||||
}
|
||||
rate_date = dom.xpath(
|
||||
'/def:wechselkurse/def:datum/text()',
|
||||
|
||||
Reference in New Issue
Block a user