Skip to content

Instantly share code, notes, and snippets.

@sambatlim
Last active October 28, 2019 02:51
Show Gist options
  • Save sambatlim/20328d4d20f316708362c73a6f6d89a1 to your computer and use it in GitHub Desktop.
Save sambatlim/20328d4d20f316708362c73a6f6d89a1 to your computer and use it in GitHub Desktop.
script to generate odoo module command. [LIVE DEMO](https://repl.it/@sambatlim/InfantileWoodenAmoebas)
print("Please, give your module name")
x = input()
print("insert 1 to use default directory, 2 to use your custom addon directory")
y = input()
if int(y) == 1:
print("Command to create the module. * Copy and paste in cmd - run cmd as administration")
directory = r"C:\Users\User\Desktop\custom_addons"
command = "\"C:\Program Files (x86)\Odoo 12.0\python\python.exe\""+" \"C:\Program Files (x86)\Odoo 12.0\server\odoo-bin\""+ " scaffold " + x
print(command + f' "{directory}"')
else:
print("Command to create the module. * Copy and paste in cmd - run cmd as administration")
print("input your custom directory")
directory = input()
print("Command to create the module. * Copy and paste in cmd - run cmd as administration")
command = "\"C:\Program Files (x86)\Odoo 12.0\python\python.exe\""+"\"C:\Program Files (x86)\Odoo 12.0\server\odoo-bin\""+ " scaffold " + x
print(command + f' "{directory}"')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment