Can not import customize module in openERP

前端 未结 6 770
梦毁少年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:05

    As @Zak said, __init__.py need only need to import the sim which is the python file you are using in the module. In __openerp__.py file, i cant find any error. The problem I found is in the sim.py file!!! You are importing only fields from openerp.osv. Your class is now inheriting the osv folder. Your class should inherit the osv file's osv class(class name: Model ). For openerp functionality, you have to import osv from openerp.osv. Please modify the sim.py with from openerp.osv import osv, fields.

提交回复
热议问题