I am new to Odoo and I need to know what is the basic steps of adding a new module.
More specifically I need to know how to add custom modules to the addons-path.
In Odoo document they explain this step as this
$ ./odoo-bin --addons-path=../custom,../enterprise/,addons
but did not work for me.
For adding a new module you should do these steps:
Build your module with your written code or scaffold command.
Add the module path in your config file at addons-path = '',''
Change your URL like this: http://localhost:8091/web?debug=1
Go to apps and from up tabs
Select update app list and refresh your page.
Now you can see your module in the apps.
If you are not getting your custom module in Odoo after adding the path then you can try to add the full path of your folder into addons-path.
To get the full path of your custom folder just right-click on the folder and go to properties and find the path of your folder.
Also, you have to make sure to Apply the Update App list in your Odoo App Dashboard after restarting the server with custom addons.
Related
I am new to Odoo.sh.
When I use the editor to create a new module using the scaffold command
odoo-bin scaffold shelter
The module is named shelter, however, when I try to update current module,
it shows warning:
odoo.modules.loading: invalid module names, ignored: shelter
When i connect to the build, I was not able to see the new module I build under apps.
Anyone know where the problem is?
Question updated:
In odoo sh, under odoo folder, tried the update all module command
In terminal, the warning shown above went away.
However, still no module found named "shelter" after I activate the dev mode and update the apps list.
no module found
Value of conf file listed:
conf file list
well The user is answered in comments. so I am adding the answer for documentation purpose.
when scaffolding a new module make sure that it is added in addon path or listed in odoo configuration file.
I am using Odoo v12 on Windows.
I have followed the steps in HowTo to create a module Saadoodoo. My problem is that I have failed to make this new module appear on the Odoo module list.
I am using the below command
python.exe odoo-bin" -d SaadoIncLocal -i Saadoodoo --addons-path D:\PythonDev\Odoo
It seems Odoo simply ignores the commands and starts the server normally, as the module does not appear on the apps list (even when selecting developer mode).
I thought the issue may be in the addon path, so I added the module under the default Odoo path along with Odoo modules in C:\Program Files (x86)\Odoo 12.0\server\odoo\addons and did an apps update on Odoo interface but still problem persists. Starting and stopping the server does not help either.
What am I doing wrong?
After adding new module in the addons_path, you have to turn on debug/developer mode, goto Apps > Update modules list, remove Apps filter from search and search your module.
Don't forget to add __manifest__.py with proper data, which is important for odoo addons.
If still having problem, you can use scaffold option of odoo-bin to create empty module.
python.exe odoo-bin scaffold my_module
This is will create a empty module with all the necessary skeleton files in the current working directory, you can just move it to addons folder, rename the variables accordingly and files and you are good to go.
There could be 2 Reasons that you are not able to see the module :-
1. You have not updated the database
Two ways to update the database :-
1.1 from Terminal use this command to update the module and database
./odoo-bin -c debian/odoo.conf -d {NAME_OF_ODOO_DATABASE} -u {NAME_OF_THE_NEW_MODULE}
1.2. From frontend
By activating the developer mode by going to Setting --> under the developer tools option --> Activate the developer mode
Now go to app list and select the option update app list.
2. You have not configured the addons path in the debian/odoo.conf file
Make sure that you have added the addons_path of the custom-addons folder in odoo.conf file inside debian folder
why don't you simply use these commands
cd C:\Program Files (x86)\Odoo 12.0\server\odoo\addons
C:\Program Files (x86)\Odoo 12.0\python\python.exe C:\Program Files (x86)\Odoo 12.0\server\odoo-bin scaffold my_module --config C:\Program Files (x86)\Odoo 12.0\server\odoo.conf
Oh once your module is ready, go to the Odoo directory in windows, navigate to custom-addons and you will see a list of all the available modules. paste your new module in there. Now open the Odoo again, go to Apps, then update module list. Then search for your app in the app list. Make sure the developer mode is activated
Go to your odoo-version folder (ex: cd /home-path/odoo-09.0/10.0/11.0/12.0/13.0) where your odoo-bin file is placed (till odoo-10.0 the file is openerp-server but in later version the file is odoo-bin)
Run the command ./odoo-bin scaffold yourModuleName destinationDirectory (odoo_version >= 10)
Run the command ./openerp-server scaffold your_module_name destinationDirectory (odoo_version < 10)
please use configuration file to run odoo(it's quite easy without any mistake)
run this command: python3 odoo-bin --save --config odoo.cfg --stop-after-init
that will save odoo.cfg file open it up and add your custom module path in addons_path varibale which is defined in top of configuartion file
using mode debug, go to your apps, click update app list
Use this command to create module in odoo.
odoo-bin scaffold mynewmodule addons
directive command module-name modulepath
Have you click Update App List in menu Apps?
This is screenshot from Odoo 11, it should applied in Odoo 12 but may be different position.
I have started using odoo and I would like to install some modules like Custom Invoice template, Pls recommend some docs or steps to install new modules.
Activate the developer mode by doing to About page (by clicking the user profile picture).
Go to settings choose "Users" from the menu Click the current user, and edit it by checking "Technical features"
Refresh the page
Unpacked the module at ../server/openerp/addons
Go to modules under settings and Click the "Update module list" menu item.
The app should display under local modules, so find your new module in Settings > Modules > Local Modules and click on the install button.
I am just posting the best steps:
create a separate folder custom_addons and place it inside the located folder of odoo in parallel with addons folder like
/opt/odoo/custom_addons ,
Now your odoo directory have two module source /opt/odoo/addons and /opt/odoo/custom_addons.
It's time to include this newly create folder in the addons path of odoo server .
Open your odoo server config :nano /etc/odoo-server.conf
append the newly create addons in addons_path like:
addons_path = /opt/odoo/custom_addons,/opt/odoo/addons
save the file and restart your odoo server .
Now place your new modules [create/purchased] in side the
custom_addons then update module list and search the name of module and install it.
I am using DNN 8 and i need slider for the home page. I have did extensive search about this on internet and i found Content Slider module.
I have added this module in the page and when i add content slider module a message appears in the pane like below
No content sliders have been created yet. Please use the Actions Menu
to create a slider.
So i used action menu to add slider, when i click Add Slider option from the action menu i get the error like below image.
Click image to see error
Not understanding what to do. So please any help me to solve this error.
This is a bug related to DNN8 deprecating support for older controls. If the module is open source you should download the source code and add references to DNN8 so that you can recompile it to get the proper references.
Steps:
Setup your development environment (link)
Download Source Code (_source) version of the module
Install _Source package via the Host/Extensions page (link)
Open the CSProj file in Visual Studio 2015
Remove reference to DotNetNuke.Web
Add reference to DotNetNuke.Web.Deprecated (found in the website's BIN folder)
Compile in Release mode to package (assuming the module supports my BUILDSCRIPTS)
Install the created _INSTALL file to your production DNN site
If the module doesn't use my BUILDSCRIPTS just compile and copy the DLL generated to your production website BIN folder
Chris
I am using Odoo v.8. I want to find out where Odoo finds information where the modules are, to load them. I am aware there is a variable addons_path in the file openerp-server.conf. The only file I have found the variable in is opt/odoo/odoo/debian/openerp-server.conf. It has the following value:
addons_path = /usr/lib/python2.7/dist-packages/openerp/addons
However, the Odoo application is using modules from "/opt/odoo/odoo/addons" path. Where the Odoo retrieves this information from? If I have a new directory with new modules, where I can update the path? I have updated addons_path in opt/odoo/odoo/debian/openerp-server.conf with new modules path, but Odoo still cannot see the modules in Settings/Update Modules List. I have restarted the server.
Thanks for your help!
You can add to the addons_path directive in openerp-server.conf, (separate paths with a comma) or you can use --addons= if starting your server from the command line.
Odoo tries to initializes a set of paths to be loaded from the base addons directory. Check the code for Odoo system path
So, with the help of this method, it loads the basic addons directory and other directories that are added by addons_path.
Generally, we use addons_path at odoo-server.conf and save our addons directory path at it.
Note: the path must contain atleast one OpenERP/Odoo module in it.
As of Odoo V8, the "default" addons_path in the odoo-server.conf file should read as follows (assuming you installed Odoo in the "/opt/odoo" path, otherwise change accordingly):
addons_path = /opt/odoo/addons
If you also need to add another "custom" folder for additional modules, separate those with a comma, like this:
addons_path = /opt/odoo/addons,/opt/odoo/custom_modules