Open ThomasBinsfeld opened 5 years ago
+1, good idea
+1, very nice! I haven't implemented bob template yet, but it's on the road-map and I'd love such feature.
Hi Guys.. I´m using odoo 14.. and found out this error. can you help? Please.
(venv) C:\Users\Messias\PycharmProjects\Odoo14exe_nmodules>mrbob bobtemplates.odoo:addon
Traceback (most recent call last):
File "C:\Users\Messias\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\Messias\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Messias\PycharmProjects\Odoo14exe_nmodules\venv\Scripts\mrbob.exe__main__.py", line 4, in
readline
is part of the python stdlib. So if import readline fails, there must be a problem with your python installation. I'm marking these two comments as off-topic as they are irrelevant to the current issue. Please open another issue if you think there is a bug.
What about a new
migration
template that would generate migration script for a given module? When being in the current module's directory:mrbob bobtemplates.odoo:migration
It would ask for:
openupgrade
? (yes/no)And then it would:
migrations/{version_number}/(pre/post)-migrate.py
file(s)logging
and add a default_logger.info()
message in themigrate
methodopenupgrade
is selected:openupgrade
@openupgrade.migrate(use_env=True)
decorator and use theenv
variable in themigrate
methodopenupgradelib
to the external dependencies of the manifestIf it's relevant, the same could be done for pre/post-init hooks (I can write a separate issue for that).