How to install new module in OpenERP 7.0 ?


As we all know that OpenERP 7.0 is near to release soon and all are waiting to use in their live business. We are trying to make people aware that how to install new module in this new version. We found some extra steps which are require to install new module which is different than OpenERP 6.1 version so just sharing with you all guys. We have created a Demo module and put that into addons directory.

1.openerp_7_login_page

Now as we can see, by default there are very less menus available at left sidebar and you won’t find ‘Update Module List’ which is there in OpenERP 6.1 by default.

2.module_list

Now lets do some small changes to see all other configuration options in left side menu list. First go to ‘Users’ menu and select ‘Administrator’ and click on ‘Edit’ button. Now change the value of ‘Administration’ field to Acess Rights and make Technical Features checkbox True. Now save record and reload again. It should display all other menus in the list. If you are not able to see all menus, you may have to re-login into the webclient.

3.admin_user

After performing above steps, you can see all menus at left sidebar as shown in following screen.

4.detail_menu_list

Now according to older version, click on ‘Update Module List’ and follow the instructions.

5.update_module_option

Finally, you will get your new module in the list.

6.module_in_list

 

Advertisements

How to Install Sale / Any Module in OpenERP


If you have already installed OpenERP and created database with the use of Web Client then after some initial configuration, immediate next step will be to install required modules. Now the question is how to install modules? Here we are with the Answer…

You may like to visit How to install OpenERP 6.1 and OpenERP 6.0 on Windows Vista and Windows 7 in 10 Minutes.

Once you finish the installation process, Open WebClient by using the URL: http://localhost:8069/web/webclient/home

Next step is to create the database,

Please visit our post on How to create database in OpenERP?

Open WebClient by using the URL: http://localhost:8069/web/webclient/home

Homepage - OpenERP Web Client
Homepage – OpenERP Web Client

Click on the Settiings -> Modules -> Modules

Modules - OpenERP Web Client
Modules – OpenERP Web Client

There are four filters available.

Filters - OpenERP Web Client
Filters – OpenERP Web Client

Apps ->  List of Main Modules

Extra ->  List of Extra Addons

Installed->  List of Installed Modules

Not Installed-> List of Not Installed Modules

As of now No Module has been Installed; Click on Apps Filter and search for the Sale Module

Sale Module - OpenERP Web Client
Sale Module – OpenERP Web Client

Now Click on Install button to install Sale Module.

Sale Module Installation in Progress - OpenERP Web Client
Sale Module Installation in Progress – OpenERP Web Client

Once Sale Module will be installed, it will ask for “Install your Chart of Accounts”; Click Cancel.

Sale Module Installed - OpenERP Web Client
Sale Module Installed – OpenERP Web Client

Refresh the Window. Apply the Filter “Installed” and verify the installed Modules.

Sale Module Installed - OpenERP Web Client
Sale Module Installed – OpenERP Web Client

Done!!! 🙂

How to create a module in OpenERP ?


It is very easy to create a module in OpenERP.

Find the below displayed screens. We will code to result this output.

Tree View

Form View

Few files needs to be created compulsory. We will take an example let say – “test_module”

First of all, we will see the architecture of a typical OpenERP module.

  1. __openerp__.py
  2. __init__.py
  3. Python files
  4. XMLFiles
    1. Actions
    2. Menu Entries
    3. Reports
    4. Wizards

All the modules are located in server/addons directory.

The following steps are necessary to create a new module “test_module”:

– create a subdirectory in the server/addons directory having module name test_module.

– create a module description file: __openerp__.py

– create the Python file containing the objects.

– create .xml files that download the data (views, menu entries, demo data, …).

– optionally create reports, wizards or workflows.

We will see each files introduction one by one.

The __init__.py file:

The __init__.py file is, like any Python module, executed at the start of the program. It needs to import the Python files that need to be loaded.

So, if you create a “test_module.py” file, containing the description of your objects, you have to write one line in __init__.py:

import test_module.py

The __openerp__.py file

In the created module directory, you must add a __openerp__.py file. This file, which must be in Python format, is responsible to

  1. determine the XML files that will be parsed during the initialization of the server, and also to
  2. determine the dependencies of the created module.

This file must contain a Python dictionary with the following values:

{
"name" : "Test Module",
"version" : "1.1",
"author" : "Open",
"category" : "Test Base/Test Base",
"depends" : ["base"],
"init_xml" : [],
"demo_xml" : [],
"update_xml" : ["test_view.xml"],
"installable": True,
"active": True
}

The test_module.py file

from osv import osv

from osv import fields

class test_base(osv.osv):

    ”’Test Base Class”’

    _name=‘test.base’

    _columns={

            ‘name’:fields.char(“Name”,size=128,),

            ‘code’:fields.char(Code,size=64)

    }

test_base()

The text_view.xml file

<?xml version=“1.0” encoding=“utf-8”?>

<openerp>

    <data>

       <record model=“ir.ui.view” id=“test_base_form”>

           <field name=“name”>test.base.form</field>

               <field name=“model”>test.base</field>

               <field name=“type”>form</field>

               <field name=“arch” type=“xml”>

                   <form string=“Test Base”>

                       <field name=“name”/>

                       <field name=“code”/>

                   </form>

              </field>

        </record>

        <record model=“ir.ui.view” id=“test_base_tree”>

            <field name=“name”>test.base.tree</field>

            <field name=“model”>test.base</field>

            <field name=“type”>tree</field>

            <field name=“arch” type=“xml”>

                <tree string=“Test Base”>

                    <field name=“name”/>

                    <field name=“code”/>

                </tree>

            </field>

        </record>

        <record model=“ir.actions.act_window” id=“action_test_seq”>

            <field name=“name”>Test Base</field>

            <field name=“res_model”>test.base</field>

            <field name=“view_type”>form</field>

            <field name=“view_mode”>tree,form</field>

        </record>

        <menuitem id=“menu_test_base_main” name=“Test Base”/>

        <menuitem id=“menu_test_base” parent=“menu_test_base_main”

                  name=“Test Base” action=“action_test_seq”/>

    </data>

</openerp>