Odoo Help


Odoo Custom Module Development Error?

Mazhar Iqbal Rana
on 10/10/14, 12:40 PM 1,508 views

Hello There

I have developed a module named as student information and files as well as content details are as follows.

1) __init__.py

import student_info

2) __openerp__.py

'name' : 'Student Information',
'version' : '6.0.1',
'author' : 'RANA',
'website' : 'http://www.tuespacioweb.com.ve',
'category' : 'General',
'depends' : ['base'],
'description' : '''Information about Students''',
'demo_xml' : [],
"data" : [ "student_view.xml"],
"installable": True,
"certificate" : ''

3) Student_info.py

from openerp.osv import fields, orm

class student_student(osv.osv):

    _name = 'student.student'

    _columns = {
            'name' : fields.char('Student Name', size=16, required = True, translate=True),
            'age' : fields.integer('Age',readonly = True),
            'percent' : fields.float('Percentage',help = 'This field will add average marks of student out of 100.'),
            'gender' : fields.selection([('male','Male'),('female','Female')],'Gender'),
            'active' : fields.boolean('Active'),
            'notes' : fields.text('Details'),

    _defaults = { 'name' : 'Atul',
        'active' : True,                    


4) Student_info_view.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- Student search view -->

<record model="ir.ui.view" id="student_search">
    <field name="name">student.search</field>
    <field name="model">student.student</field>
    <field name="type">search</field>
    <field name="arch" type="xml">
    <search string="Student Information Search">
        <field name="name" string="Student Name" />
        <field name="gender" string="Gender" />
        <field name="age" string="Age" />

<!-- Student tree view -->

<record id='student_student_tree' model='ir.ui.view'>
    <field name='name'>student.result.tree</field>
    <field name='model'>student.student</field>
    <field name='type'>tree</field>
    <field name='arch' type='xml'>
        <tree string="Student_result">
            <field name="name" />
            <field name="age" />
            <field name="percent" />
            <field name="gender" />
            <field name="active" />

<!--Student Form View-->

<record id='student_student_form' model='ir.ui.view'>
    <field name="name">student.result.form</field>
    <field name="model">student.student</field>
    <field name="type">form</field>
    <field name="arch" type="xml">
        <form string="Student_result">
            <field name="name" />
            <field name="age" />
            <field name="percent" />
            <field name="gender" />
            <field name="active" />
            <field name="notes" />

<!-- Student Action-->

<record id="action_student_student" model="ir.actions.act_window">
    <field name='name'>Student Information</field>
    <field name='res_model'>student.student</field>
    <field name='view_type'>form</field>
    <field name='view_mode'>tree,form</field>

<!--Student Menu-->

<menuitem id="student_parent" name="Student" icon="terp-partner"/>
<menuitem id="menu_student_parent" name="Student Management" parent="student_parent"></menuitem>
<menuitem action="action_student_student" id="menu_student_student" parent="menu_student_parent" string="Result"/>




Now, after all that: Error I am now receving after installing module from Openerp localhost is given below:


My Error after doing exactly what you said is:

Client Traceback (most recent call last):
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\openerp\addons\web\http.py", line 204, in dispatch
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\openerp\addons\web\controllers\main.py", line 1132, in call_button
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\openerp\addons\web\controllers\main.py", line 1120, in _call_kw
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\openerp\addons\web\session.py", line 42, in proxy
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\openerp\addons\web\session.py", line 30, in proxy_method
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\openerp\addons\web\session.py", line 103, in send

Server Traceback (most recent call last):
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\openerp\addons\web\session.py", line 89, in send
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\.\openerp\netsvc.py", line 296, in dispatch_rpc
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\.\openerp\service\web_services.py", line 626, in dispatch
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\.\openerp\osv\osv.py", line 190, in execute_kw
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\.\openerp\osv\osv.py", line 132, in wrapper
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\.\openerp\osv\osv.py", line 199, in execute
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\.\openerp\osv\osv.py", line 187, in execute_cr
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\openerp\addons\base\module\module.py", line 426, in button_immediate_install
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\openerp\addons\base\module\module.py", line 477, in _button_immediate_function
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\.\openerp\pooler.py", line 39, in restart_pool
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\.\openerp\modules\registry.py", line 233, in new
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\.\openerp\modules\loading.py", line 354, in load_modules
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\.\openerp\modules\loading.py", line 254, in load_marked_modules
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\.\openerp\modules\graph.py", line 102, in add_modules
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\.\openerp\modules\module.py", line 344, in load_information_from_description_file
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\.\openerp\tools\safe_eval.py", line 285, in safe_eval
  File "C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\.\openerp\tools\safe_eval.py", line 158, in test_expr
  File "<string>", line 15
SyntaxError: invalid syntax


Please Guide me about these errors... Thanks a lot

try to find this "schoolsout.py" in your module

Hengky Zhang
on 10/10/14, 1:06 PM

I couldn't get it..Whats this file and how to recover from this error?

Mazhar Iqbal Rana
on 10/11/14, 10:31 AM

Hello Mazhar, Can you please add the content of __init__.py files

Emipro Technologies Pvt. Ltd.
on 10/11/14, 10:42 AM

Hello Emipro Technologies I already have placed its content its just a single line saying... import student_info

Mazhar Iqbal Rana
on 10/11/14, 11:04 AM
On 10/11/14, 11:09 PM

Does "student_student()" line insided the class or outside the class student_student?

Its Outside

Mazhar Iqbal Rana
on 10/12/14, 9:19 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

4 follower(s)


Asked: 10/10/14, 12:40 PM
Seen: 1508 times
Last updated: 3/16/15, 8:10 AM