From 24c2c1e9025d1e903dffae28623b2add18c4b35c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Pulver?= Date: Thu, 13 Dec 2018 11:20:25 +0100 Subject: [PATCH] Migrate and convert module from odoo 8.0 to flectra 1.0 --- migrator/migrator.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migrator/migrator.py b/migrator/migrator.py index 1699450..9b061a6 100644 --- a/migrator/migrator.py +++ b/migrator/migrator.py @@ -5,6 +5,7 @@ import logging import os import re import shutil +import subprocess from os.path import join as oj from shutil import copytree @@ -213,6 +214,7 @@ class ModuleMigrator(object): def migrate(self): _logger.info('Starting migration of module %s', self._module_name) copytree(self._src, self._destination, symlinks=True, ignore_dangling_symlinks=True) + subprocess.call(['2to3', '-w', self._destination]) for base, odoo_dirs, odoo_files in os.walk(self._destination, topdown=True): odoo_files = [f for f in odoo_files if not f[0] == '.'] odoo_dirs[:] = [d for d in odoo_dirs if not d[0] == '.']