From dcb271a5717f181f6c2e819211a31e92f7067457 Mon Sep 17 00:00:00 2001 From: DiG Date: Thu, 3 Feb 2022 13:10:29 +0100 Subject: [PATCH] Added config folder with TSV columns for each model --- config.py | 17 ++++++++++++++++- config/ir.module.module.tsv | 1 + config/product.uom.tsv | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 config/ir.module.module.tsv create mode 100644 config/product.uom.tsv diff --git a/config.py b/config.py index 1d42a72..8435197 100644 --- a/config.py +++ b/config.py @@ -1,9 +1,24 @@ +import os # CONFIG -FOLDER = '/home/dig/odoo-export/datas' +APPDIR = os.path.dirname( os.path.realpath(__file__) ) +DATADIR = '%s/datas' % APPDIR +CONFDIR = '%s/config' % APPDIR +FOLDER = DATADIR + MODEL_IGNORE = [] with open(".modelignore", "r") as file: for line in file: MODEL_IGNORE.append(line.strip()) + +conf_files = os.listdir( CONFDIR ) +keyword = 'your_keyword' +for file in conf_files: + if os.path.isfile(file): + if file.endwith('.tsv'): + eprint( 'Conf file: ', file ) + f = open(os.path.join(CONFDIR,file),'r') + eprint( file[:-4], f.split() ) + f.close() \ No newline at end of file diff --git a/config/ir.module.module.tsv b/config/ir.module.module.tsv new file mode 100644 index 0000000..107e7c5 --- /dev/null +++ b/config/ir.module.module.tsv @@ -0,0 +1 @@ +id name display_name application write_uid write_date dependencies_id \ No newline at end of file diff --git a/config/product.uom.tsv b/config/product.uom.tsv new file mode 100644 index 0000000..cd1f4c2 --- /dev/null +++ b/config/product.uom.tsv @@ -0,0 +1 @@ +id name category \ No newline at end of file