How to install/uninstall a module on button click in openerp? - odoo

can anyone help me with the code to install and uninstall a module on button click in OpenERP?

If you are developing a module and want to be abble to install it to OpenERP, you just have to include the following line in your __openerp__.py
'installable': True,
And make sure also that your module is inside an addons path that is included on your configuration file.
This way, you will be able to search for you module and install it.

Related

How I can add new module to odoo 15

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.

Why doesn't my new Odoo module show up on the module list?

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.

How can I install apps/modules in odoo v9

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.

DNN Content slider module not working

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

how can I view the installed openerp modules

Hi I am using openerp 7 on my XP . I have created a custom openerp module . It was shown in openerp and I installed it successfully but now I dont know where it has been installed. I also cannot view other installed openerp modules . I wanted to see the installed modules . How to view them?
Hopes for suggestion
When you said you installed the module, what all you have done? Here are some steps to follow.
Create the module (detail on how to create a module is out of scope)
copy the module folder in to the addons folder
Login in as admin
you probably want to see technical details as admin. So, go to "Settings / Users / Users". Open the admin record and edit it. And on access rights tab enable "Technical features". Save the form and reload the page.
If the DB is created before the modules folder was copied in to addons, go to "Settings / Modules / Update module list" and Update the module list.
Go to "Settings / Modules / Installed module" remove the "installed" filter from search box and search for your module name.
Once found the module, click the install button.
from "Settings / Modules / Installed module" find and open the module in form view. Under the "Technical Data" tab, you will see the views added by the module. Under "Features tab" you will all the menus and report created by the module.