It is currently Sat Feb 11, 2012 8:43 pm

All times are UTC + 2 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Error while installing new module
PostPosted: Thu Mar 11, 2010 2:12 pm 
Offline

Joined: Tue Mar 09, 2010 12:21 pm
Posts: 13
Location: India
Hi all,
I create new module by reading Developer book and on reference of some module .

when I try to install module get following application error:

File "/usr/lib/python2.5/site-packages/openerp-server/addons/__init__.py", line 578, in load_module_graph
register_class(package.name)
File "/usr/lib/python2.5/site-packages/openerp-server/addons/__init__.py", line 406, in register_class
zimp.load_module(m)
File "/usr/lib/python2.5/site-packages/openerp-server/addons/student_info.zip/student_info/__init__.py", line 1, in <module>
# -*- encoding: utf-8 -*-
ZipImportError: bad local file header in /usr/lib/python2.5/site-packages/openerp-server/addons/student_info.zip


My module Name is :student_info
code in _init__.py : import student_info

code in __terp__.py file is :
{
"name" : "School Management",
"author" : "Tiny",
"version" : "1.0",
"depends" : ["base",],
"init_xml" : [],
"update_xml" : [
"student_info_view.xml",
],
"category" : "Enterprise Specific Modules/Student Management",
"active": False,
"installable": True
}

code in student_info.py file is :

from osv import osv, fields

class training_class(osv.osv):
_name = 'training.class'
_columns = {
'x_name' : fields.char('Class Name' , size=30 ,required = True),
'x_capacity' : fields.integer('Max Capacity'),
'x_beamer' : fields.boolean('Active', select=2),
}
training_class()

class training_course(osv.osv):
_name = 'training.course'
_inherit = 'res.partner'
_columns ={
'x_name' : fields.char('Course Title',size=40,required=True),
'x_teacher_id' : fields.many2one('res.partner','Teacher'),
'x_note' : fields.text('Course Note'),
'x_code' : fields.char('Code',size=16),
}
training_course()
class training_session(osv.osv):
_name = 'training.session'
_columns = {
'x_name' : fields.char('Session Name' , size=40, required=True),
'x_lang' : fields.selection([('eng','English'),('Fren','Frinch')])
'x_datefrom' : fields.datetime('Date From'),
'x_dateto' : fields.datetime('Date To'),
'x_class_id' : fields.many2one('training.class','Class'),
'x_course_id' : fields.many2one('training.course' ,'Course'),
}
training_session()


I only use python object from file student_info.py in the .XML file .

so please, help me.

_________________
Shankar


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 11, 2010 4:36 pm 
Offline

Joined: Fri Nov 21, 2008 9:56 am
Posts: 3061
Location: Lotharingie
in server, unzip student_info.zip in addons/student_info (but warning, you do not have addons/student_info/student_info)
in client go to administration->modules, update list of modules, install your module.
If you use dia to build your modules, or generally, unzip it in addons before, and update list of modules.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 12, 2010 3:34 pm 
Offline

Joined: Tue Mar 09, 2010 12:21 pm
Posts: 13
Location: India
Hi GEM,

Thank for quick replay, now the module installed.

well ,I can view the main menu {student Management } follows sub menu (Class Room,Session,Course) , for course menu it work fine, others get error(Session and class room)

For this error is Google but can't find appropriate solution.

Error is follows:

ProgrammingError: operator does not exist: integer = boolean
LINE 1: select name, model from ir_ui_view where (id=false or inheri...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.

_________________
Shankar


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 12, 2010 5:02 pm 
Offline

Joined: Fri Nov 21, 2008 9:56 am
Posts: 3061
Location: Lotharingie
Possible reasons:
1. _rec_name does not appear(if no field with 'name') .
2. inherited_view is wrongly referenced.
3. Any other view is referenced in action (rather than form,tree,graph,calendar,gantt).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP