4

I read the official tutorials,Odoo's scaffolding can setup a basic module. To quickly get started simply invoke:

$ ./odoo-bin scaffold Academy my-modules

I tried it but it didn't work,Because it remind Odoo-bin is not a command

I have entered the odoo installation directory

L.Ming
  • 71
  • 1
  • 1
  • 7

5 Answers5

14

Use this command on the command-line:

"<Path_to_python.exe in the Odoo folder>" "<Path_to_odoo-bin>" scaffold "<Path_to_addons_folder>"

E.g.:

"c:\Program Files (x86)\Odoo 11.0\python\python.exe" "C:\Program Files (x86)\Odoo 11.0\server\odoo-bin" scaffold <module name here> "C:\Program Files (x86)\Odoo 11.0\server\odoo\addons"
Jongware
  • 22,200
  • 8
  • 54
  • 100
Beginner
  • 156
  • 1
  • 3
1

I used the following method for Odoo 12.0 installed on Windows. First run command prompt as administrator. Then use cd to change directory. Then execute python, navigate to odoo-bin, call scaffold with parameters 1)module name and 2)qualified install location. (openacademy is the name of the module from the tutorial)

C:\WINDOWS\system32>cd C:\Program Files (x86)\Odoo 12.0\python

C:\Program Files (x86)\Odoo 12.0\python>python ..\server\odoo-bin scaffold openacademy ..\server\odoo\addons

Lance
  • 11
  • 1
1

Maybe this will help someone.
After googling around I found this post.

I too had issue with using scaffold command in windows and couldn't understand what is wrong with it, until I figure it out.
My issue was that I was getting error

PermissionError: [WinError 5] Access is denied: 'C:\Program Files\

This is basically telling you that permission is denied as you cannot create inside of the above mentioned path. This got me to thinking that I have not pointed to the right path and my solution below worked.
Good Luck

I presume that your project is up and running / installed correctly, so if so this will work.

  1. Navigate to the project folder
  2. Run command like this
    python odoo-bin scaffold yourmodulename ./addons
    (make sure that your python is installed and win environment is setup to recognize the python command)



I tried this in Git Bash and Command Prompt and it works.

mackelele
  • 111
  • 7
0

I have created the summarize of all the process of command to create the module and change the addon repository.

Run your CMD as administration and copy and paste the command below and hit enter.

"C:\Program Files (x86)\Odoo 12.0\python\python.exe" "C:\Program Files (x86)\Odoo 12.0\server\odoo-bin" scaffold manageasset "C:\Users\User\Desktop\custom_addons"

<==============================================>

Command explanation:

"C:\Program Files (x86)\Odoo 12.0\python\python.exe" "C:\Program Files (x86)\Odoo 12.0\server\odoo-bin": this command is the respository of your odoo12 instalation -It used to be odoo-bin.

"scaffold": will create the module.

"manageasset": name of your module.

"C:\Users\User\Desktop\custom_addons": your custom module directory. By default It is "C:\Program Files (x86)\Odoo 12.0\server\odoo\addons".

<==============================================>

Incase you don't know how to change the addon directory follow this:

  1. Go to this repository: "C:\Program Files (x86)\Odoo 12.0\server"
  2. Find this file: "odoo.conf"
  3. Find the word addons_path and add the new repository you want. Example: addons_path = C:\Program Files (x86)\Odoo 12.0\server\odoo\addons,C:\Users\User\Desktop\custom_addons

<====================The end========================> Link to github gist

Sambat
  • 64
  • 1
  • 9
0

Solution

  1. Actívate your venv "ven/Script activate"
  2. Execute in your addons directory "python odoo-bin scaffold <name_custom_module> "

PD: if You prefer define other place to put your <custon_module> You can do it ofbthis way: python odoo-bin scaffold "<name_custom_module> dir/route-that-you-prefer"