0
votes

I have made a module with following settings. But it doesnt shows of in my modules list after updating and adding not installed filter in modules. I have installed OE on ubuntu 13.10 via debian installer. The directory is located at /usr/share/pyshared/openerp/addons/ashok/ashok.py,init.py,views.xml,_openerp.py Is there a permission issue? I have chmod 777 on every folder/file just to be on safer side.

Is there a config issue cat /etc/openerp/openerp-server.conf outputs

[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = False
db_port = False
db_user = openerp
db_password = False

openerp.py openerp descriptor file

{
'name' : 'ashok',
'version' : '1.0',
'author' : 'Ashok',
'description' : 'Just a new module to say Hello',
'website' : '',
'depends' : ['base'],
'data': ['views.xml'],
'demo' : [],
    'installable': True,
    'auto_install': False,

}

Other files are

views.xml

<?xml version="1.0" encoding="utf-8"?>
  <openerp>
    <data>

      <record model="ir.ui.view" id="ashok_form_view">
        <field name="name">ashok.form</field>
        <field name="model">ashok</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
          <form string="Ashok" version='7.0'>
            <field name="title"/>
            <field name="note"/>
            <field name="note_date"/>
          </form>
        </field>
      </record>

      <record model="ir.actions.act_window" id="action_ashok_form">
        <field name="name">ashok</field>
        <field name="res_model">ashok</field>
      </record>

      <menuitem name="Ashok" icon="terp-project" id="ashok_menu"/>
      <menuitem name="Notes" parent="ashok_menu" id="ashok_menu_mainform" action="action_ashok_form"/>

    </data>
  </openerp>

ashok.py

from openerp.osv import osv, fields

class ashok(osv.osv):
    """docstring for ashok"""

    _name = 'ashok'
    _description = "Hello from OpenERP"
    _columns = {
        'title' : fields.char('Title', size=30, required=True),
        'note' : fields.text('Note'),
        'note_date' : fields.date('Date'),
    }
ashok()

the whole code is at https://github.com/ashoksahoo/openerp-module

3
Cloned the module in a windows machine. Works perfectly.. Linux is still not working..Ashok Kumar Sahoo

3 Answers

1
votes

As Gustavo says, you will need to run Update modules list but before you do this you need to ensure that the directory that contains your module is in the OpenERP addons path. The simplest way to tell is to just start OpenERP and have a look in the log. As part of the start it should log the addons paths in use have a look for a line that says INFO ? openerp: addons paths: /home/... - this will be a comma separated list of all the locations OpenERP will attempt to load modules from. You can set this in your configuration file as addons_path

1
votes

According to my knowledge when you add .py file or make changes in it you need to restart openerp server (so that it will generate/regenerate compiled file i.e. .pyc of it). After that you have to run update module list. And then it will show the module or changes you have made in it.

And Command to restart OpenERP server is sudo service openerp restart .

0
votes

You should update the modules list in OpenERP. Try clicking Update modules list in your settings menu in your OpenERP database