Skip to content

Commit 6a7f050

Browse files
committed
[MOV] spreadsheet: move spreadsheet utils to util folder
`upgrade-util/src/spreadsheet` clashes with `upgrade/spreadsheet`. Both are merged in `odoo.upgrade.spreadsheet` from the python point of view. When importing `from odoo.upgrade.util.spreadsheet`, python follows the path and stops at the first package package (first folder with `__init__.py`) Currently, if you add tests in `upgrade/spreadsheet/tests`, they are ignored (because of `upgrade-util/spreadsheet/__init__.py`). If you remove the `__init__.py` file, it works. With this commit, we move all spreadsheet utils (more are coming) into the `util` folder, which allows to safely have an `__init__.py` file. Tests are kept in `upgrade-util/spreadsheet`, but without any `__init__.py` file. Note that moving those files is a breaking change and it's not retro-compatible. However, those spreadsheet utils have only been merged a few weeks ago. They are most probably not used outside our internal upgrade repo. closes #92 Related: odoo/upgrade#6086 Signed-off-by: Christophe Simonis (chs) <[email protected]>
1 parent 54e0abe commit 6a7f050

File tree

3 files changed

+1
-1
lines changed

3 files changed

+1
-1
lines changed

src/spreadsheet/tests/test_spreadsheet_tokenizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from odoo.addons.base.maintenance.migrations.spreadsheet.tokenizer import tokenize
21
from odoo.addons.base.maintenance.migrations.testing import UnitTestCase
2+
from odoo.addons.base.maintenance.migrations.util.spreadsheet import tokenize
33

44

55
class SpreadsheetTokenizeTest(UnitTestCase):
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)