mirror of
https://gitlab.com/flectra-community/l10n-switzerland-flectra.git
synced 2024-11-16 19:12:04 +00:00
14a109dc87
[ADD] l10n_ch_zip [ADD] l10n_ch_bank_statement_import_postfinance
21 lines
593 B
Python
21 lines
593 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', report=None,
|
|
)
|
|
|
|
|
|
def post_init(cr, registry):
|
|
import_csv_data(cr, registry)
|