l10n-switzerland-flectra/l10n_ch_zip/hooks.py
Raphael Ritter 01c4b75822 🐛 l10n_ch_zip: Change module to use new base_location app as base
[FIX] l10n_ch_zip compantibility with Flectra 2.0
[FIX] Translation id collisions
2021-08-10 15:45:24 +02:00

17 lines
514 B
Python

# Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from flectra.tools import convert_file
def import_csv_data(cr, registry):
"""Import CSV data as it is faster than xml and because we can't use
noupdate anymore with csv"""
filenames = ['data/res.city.csv', 'data/res.city.zip.csv']
for filename in filenames:
convert_file(
cr, 'l10n_ch_zip',
filename, None, mode='init', noupdate=True,
kind='init'
)