Python 模块列表更新后未显示OpenERP自定义模块
我的自定义模块在模块列表中仍然不可见 但是,可以通过以下代码找到:Python 模块列表更新后未显示OpenERP自定义模块,python,openerp,Python,Openerp,我的自定义模块在模块列表中仍然不可见 但是,可以通过以下代码找到: Put module in addons-path [x] Technical Features [x] Restart openerp-server [x] Click the update module list button [x] Clea
Put module in addons-path [x]
Technical Features [x]
Restart openerp-server [x]
Click the update module list button [x]
Clear the "installed" filter in the search box [x]
编辑
模块结构
import openerp
pool = openerp.modules.registry.RegistryManager.get("test")
cr = pool.db.cursor()
uid = openerp.SUPERUSER_ID
module = pool.get("ir.module.module")
module_id = module.search(cr,uid,[("name","=","helloworld")])[0]
helloworld = module.browse(cr,uid,module_id)
In [4]: helloworld.name
Out[4]: u'helloworld'
In [7]: helloworld.state
Out[7]: u'uninstalled'
\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuupy
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $ ls
total 20K
-rw-r--r-- 1 chaouche chaouche 222 Mar 7 19:27 client.py
-rw-r--r-- 1 chaouche chaouche 14 Feb 18 16:37 __init__.py
-rw-r--r-- 1 chaouche chaouche 444 Mar 7 20:02 __openerp__.py
-rw-r--r-- 1 chaouche chaouche 4.8K Mar 7 21:14 view.xml
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $ cat __openerp__.py
{
"name" : "Hello World !",
"author" : "yassine chaouche",
"version" : '0.1',
"email" : "yacinechaouche@yahoo.com",
"website" : "http://ychaouche.wikispot.org",
"category" : "example",
"description" : "a simple hello world example showing how to create a module",
"summary" : "Hello world !",
"depends" : ["base"],
"data" : ["view.xml"],
"demo" : [],
"installable" : True,
}
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $ cat client.py
from openerp.osv import osv, fields
class client(osv.osv):
_inherit = "res.partner"
_columns = {
"document" : fields.binary("document")
}
c = client()
#yassine
print "my module : client is : ",c
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $
client.py
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $ ls
total 20K
-rw-r--r-- 1 chaouche chaouche 222 Mar 7 19:27 client.py
-rw-r--r-- 1 chaouche chaouche 14 Feb 18 16:37 __init__.py
-rw-r--r-- 1 chaouche chaouche 444 Mar 7 20:02 __openerp__.py
-rw-r--r-- 1 chaouche chaouche 4.8K Mar 7 21:14 view.xml
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $ cat __openerp__.py
{
"name" : "Hello World !",
"author" : "yassine chaouche",
"version" : '0.1',
"email" : "yacinechaouche@yahoo.com",
"website" : "http://ychaouche.wikispot.org",
"category" : "example",
"description" : "a simple hello world example showing how to create a module",
"summary" : "Hello world !",
"depends" : ["base"],
"data" : ["view.xml"],
"demo" : [],
"installable" : True,
}
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $ cat client.py
from openerp.osv import osv, fields
class client(osv.osv):
_inherit = "res.partner"
_columns = {
"document" : fields.binary("document")
}
c = client()
#yassine
print "my module : client is : ",c
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $
\uuuu init\uuuuu.py
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $ ls
total 20K
-rw-r--r-- 1 chaouche chaouche 222 Mar 7 19:27 client.py
-rw-r--r-- 1 chaouche chaouche 14 Feb 18 16:37 __init__.py
-rw-r--r-- 1 chaouche chaouche 444 Mar 7 20:02 __openerp__.py
-rw-r--r-- 1 chaouche chaouche 4.8K Mar 7 21:14 view.xml
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $ cat __openerp__.py
{
"name" : "Hello World !",
"author" : "yassine chaouche",
"version" : '0.1',
"email" : "yacinechaouche@yahoo.com",
"website" : "http://ychaouche.wikispot.org",
"category" : "example",
"description" : "a simple hello world example showing how to create a module",
"summary" : "Hello world !",
"depends" : ["base"],
"data" : ["view.xml"],
"demo" : [],
"installable" : True,
}
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $ cat client.py
from openerp.osv import osv, fields
class client(osv.osv):
_inherit = "res.partner"
_columns = {
"document" : fields.binary("document")
}
c = client()
#yassine
print "my module : client is : ",c
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $
view.xml
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $ cat __init__.py
import client
chaouche@karabeela ~/CODE/OPENERP/addons/helloworld $
chaouche@karabeela~/CODE/OPENERP/addons/helloworld$cat view.xml
client.form
合伙人
chaouche@karabeela~/CODE/OPENERP/addons/helloworld$
确定,尝试设置->更新模块列表
然后打开设置->已安装模块,删除搜索栏中的“已安装”过滤器并搜索您的模块。我希望你能找到它;-) 你能给我们看看你的开瓶器吗?以及整个模块(文件)结构?我已经编辑了描述以添加它们。(来自)您尝试在哪里安装模块或在哪里查找模块?设置->应用程序或设置->已安装模块?因为你在应用程序下找不到它。如果您没有看到“已安装的模块”,请在“设置”>“应用”中为用户管理员激活“技术”标志。是的,我检查了技术标志。请看哦!所以我找错地方了。我从未想过在installed module(已安装模块)菜单中搜索已卸载的模块。这完全违反直觉!谢谢你的帮助!是的,菜单有点混乱。NP