Can not import customize module in openERP

前端 未结 6 812
梦毁少年i
梦毁少年i 2021-01-20 10:35

i have done simple customize module in openerp with using python and xml. but I cannot import in openerp. My module is not shown in openerp.

this is

6条回答
  •  遇见更好的自我
    2021-01-20 11:15

    this will work fine. Try this. Update all your files.

    __openerp__.py   File
    
    {
    'name': 'Student Information Management',
    'version': '0.1',
    'category': 'Tools',
    'description': """This module is for the Student Information Management.""",
    'author': 'Mir Nauman Tahir',
        'website': 'http://mirnauman.wordpress.com/',
    'depends': ['base'],
    'data': ['sim_view.xml'],
    'demo': [],
    'installable': True,
        'auto_install': False,
        'application': True,
    
    }
    
    
     __init__.py File
    
    import sim
    
    
    
    
    sim.py File
    
    
    from openerp.osv import fields, osv
    class student(osv.osv):
    _name = "sim.student"
    _description = "This table is for keeping personal data of student"
    _columns = {
        'name': fields.char('Registration Number',size=256,required=True),
        'student_name': fields.char('Student Name',size=256,required=True),
        'father_name': fields.char('Father Name',size=256),
        'gender':fields.selection([('male','Male'),('female','Female')],'Gender'),
        'contact_no':fields.char('Contact Number',size=256)
    }
    student()
    
    
    sim_view.xml File
    
    
    
    
    
    
    
    Student
    sim.student
    form
    
    
    Student sim.student tree Student sim.student form tree,form

    After updating all your files, Restart the server, update module list and find your module in Settings > Modules > Installed Modules - remove installed from there and write your module's name (i.e sim) over there.

    Hope this will definitely work.

提交回复
热议问题