Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

6

swapnil wagh

--swapnil wagh--
1559
| 6 5 8
Pune, India
--swapnil wagh--

My name is Swapnil A. Wagh. I studied Master Of computer Science and work as a Software Engineer. I’m a technology enthusiast and always eager to learn new and exciting technologies. I’m constantly looking for innovative solutions to age-old problems that push the limits of what we conceive to be possible.

swapnil wagh
On 10/11/14, 4:45 AM

Hello 

If you want module should auto install at the time of database creation you can make it auto installable by changeing __openerp__.py file like:

# -*- coding: utf-8 -*-
{
    'name': 'Auto install',
    'category': 'Hidden',
    'version': '8.0.1.0',
    'description':
        """
OpenERP auto instal module
=============================
        """,
    'depends': ['web'],
    'auto_install': True,
    'init_xml' : ["static/src/xml/template.xml",],
    'qweb' : ['static/src/xml/base.xml',],
    'js' : ['static/src/js/main.js'],
    'bootstrap': True,
}

If you want to install module on any button event from your custome module you can use below code:

module_obj = pool.get('ir.module.module')

module_list = ['sale','purchase']

module_ids_to_install = module_obj.search(cr, 1, [('name','in',module_list)])

module_obj.update_list(cr, 1, context=None)  // just to update module list to update new module added

module_obj.button_immediate_install(cr, 1, module_ids_to_install, context=context)

 

 

 

0

deep

--deep--
1617
| 5 4 7
Bengaluru, India
--deep--

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

deep
On 9/30/14, 9:19 AM

in __openerp__.py,  set 'auto_install': True,

thx for replying but i need install coutom module

ahmedrabie
on 9/30/14, 9:55 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 9/28/14, 7:36 AM
Seen: 959 times
Last updated: 3/16/15, 8:10 AM