简体   繁体   English

无法在OpenERP 6中安装新模块

[英]Unable to install new module in OpenERP 6

I have developed a module 'newpatient' which I am unable to install through a Compressed file folder. 我已经开发了模块“ newpatient”,无法通过压缩文件夹安装。 I have read the OpenERP dev. 我已经阅读了OpenERP开发人员。 book as well as this blog on creation of new module. 本书以及有关创建新模块的博客 When installing after a copy-paste job from this blog, the module 'notebook' gets installed & working. 在从此博客进行复制粘贴作业之后进行安装时,模块“笔记本”将安装并正常工作。 I apply the same steps (Even checked the code n times now) to my module but still CAN'T get it installed. 我对模块应用了相同的步骤(即使现在已经检查了n次代码),但仍然无法安装它。 Even though I get the msg on ERP client ' Modules installed', the module is not in the 'Modules' list. 即使我在ERP客户端“已安装模块”上获得了消息,该模块也不在“模块”列表中。 What could be possibly wrong? 有什么可能是错的吗?

Here's the code. 这是代码。 the newpatient.py file: newpatient.py文件:

from osv import fields, osv
import time

class newpatient(osv.osv):
_name = "Newpatient"
_description = "Creating new patient"
_columns = {'name':fields.char('Name',size=30,required=True),
            'address':fields.char('Address',size=50,required=True),
            }
newpatient()

The __init__.py file: __init__.py文件:

import newpatient

The __openerp__.py file: __openerp__.py文件:

{
"name" : "Newpatient",
"version" : "1.0",
"author" : "K Y",
"category" : "Generic Modules/Others",
"depends" : ["base"],
"init_xml" : [newpatient_view.xml],
"demo_xml" : [],
"update_xml" : [],
"installable": True,
"active": False
}

Really stuck. 真的卡住了。 Would appreciate some help. 希望能有所帮助。

I'm not sure but try with 我不确定,但可以尝试

_name="newpatient"

To check if the module is installed, go to "Administration / Customisation / Database Structure" and look for newpatient (because it could be your view that isn't well formated) 要检查模块是否已安装,请转到“管理/自定义/数据库结构”并寻找新病人(因为这可能是您的视图格式不正确)

Tell me if it works... 告诉我是否可行...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM