Openerp:新模块未显示在模块列表中
基本上我有两个问题:
- 我新编码的模块没有显示在模块列表中,所以我无法安装。
- 我想在安装之前调试我的模块,有什么办法可以做到这一点
Basically I have two problems:
- My newly coded module is not showing into module list , so I am unable to install.
- I want to debug my module before installation , is there any way through i can do that
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
确保模块位于addons目录中(在linux机器中),否则检查终端中addons的路径,
然后更新OpenERP中的模块列表。(更新模块列表仅对具有完全访问权限的管理员可见。)
然后您可以在模块列表中看到您的模块,并且从表单视图中您可以安装/卸载该模块。
调试 OpenERP 模块:您已使用
--log-level=debug_rpc_answer
参数启动服务器。例如。
Make sure that the module is in addons directory(in linux machine), else check the path of the addons in terminal,
after that update the module list in OpenERP.(update module list will only visible to admin with full access rights.)
then you can see your module in module list, and from form view you can install/un install the module.
to debug the OpenERP module: you have start the server with
--log-level=debug_rpc_answer
parameter.eg.
我正在展示最新主干版本的这个东西 okz。
如果您在插件中开发了一个新模块,并且已将其添加到插件文件夹中,并且它也没有显示在模块列表中,那么首先要重新启动服务器。
然后转到浏览器并打开
登录 OpenERP 进入设置菜单并进入 USERS >用户
选择您的用户并对其进行编辑,然后选中技术功能复选框,然后保存并重新加载浏览器。
比重新加载后转到设置>设置中现在的设置>模块。您将在模块菜单中找到三个子菜单。就像这样,
然后转到更新模块列表然后更新它然后搜索您的模块,您可以找到它。
希望对您有帮助...
谢谢ZZ...
I am showing this thing for the latest trunk version okz.
If you have developed a new module in addons and if u have added it in the addons folder and than also it is not showing in the module list than first of all restart the server by this.
than go to the browser and open the
than login into OpenERP than goto the settingz menu and than to USERS > users
than select ur user and edit it than check the checkbox of TECHINAL FEATURES than save it and reload the brower.
Than after reload go to the setting than now in setting > module. U will find three sub menus in the module menu. Itz like this,
Than go to the Update Modules list than update it than search ur module and u can find it their.
HOPE IT WILL BE HELPFULL TO U...
ThankzZZ...
您应该将模块放在这里 /usr/lib/pymodules/python2.7/openerp/addons ,这与通常错误放置到 /usr/share/pyshared/openerp/addons 的情况不同,
更改所有权:
sudo chown -R root.root usr/lib/pymodules/python2.7/openerp/addons/module_name
更改模块的权限:
sudo chmod 755 /usr/lib/pymodules/python2.7/openerp/addons/module_name -R
重新启动服务器:
sudo 服务 openerp 重新启动
You should put your module here /usr/lib/pymodules/python2.7/openerp/addons unlike commonly misplaced to /usr/share/pyshared/openerp/addons
change ownership:
sudo chown -R root.root usr/lib/pymodules/python2.7/openerp/addons/module_name
change permissions of the module:
sudo chmod 755 /usr/lib/pymodules/python2.7/openerp/addons/module_name -R
restart the server:
sudo service openerp restart
您是否通读过文档中的模块开发章节?您是否在现有
addons
目录下或其他位置创建了模块目录?如果您将其放在其他地方,那么您必须创建从addons
目录到您的模块的链接,或者压缩您的模块并将其导入到服务器。至于测试模块,您可以创建测试场景作为模块的一部分。当您使用示例数据创建数据库,然后在该数据库上安装模块时,它们就会被执行。
Have you read through the module development chapter in the documentation? Did you create your module directory under the existing
addons
directory or somewhere else? If you put it somewhere else, then you either have to create a link from theaddons
directory to your module, or zip up your module and import it to the server.As for testing your module, you can create test scenarios as part of the module. They get executed when you create a database with sample data and then install your module on that database.
您需要为管理员用户启用“扩展视图”。
然后,在重新启动实例后(这是服务器可以看到新模块所必需的),您将能够转到“首选项 -> 模块 -> 更新模块列表”。之后,您的模块应该出现在模块列表中。
要调试您的模块,我建议在您的操作调用的代码中添加 pdb 断点,例如,
这将导致 Python 解释器在运行回调时进入调试模式。
you need to enable "extended view" for your admin users.
Then, after restarting your instance (necessary so that the new module is seen by the server) you will be able to go to "Preferences -> Modules -> Update module list". After that, you module should appear in the Modules list.
To debug your module, I suggest adding pdb break points in the code which is called by your actions, using e.g.
This will cause the Python interpreter to go in debug mode when the callback is run.
更新模块列表后,转到已安装的模块。从页面右上角的过滤器下拉列表中删除已安装过滤器。然后搜索你的模块名称(因为通常模块的数量都不止一页)
After updating your module list, go to Installed modules. Remove the installed filter from the filter drop down at the top right of the page. Then search for your module name (since normally the number of modules are more than one page)
然后您将看到模块。
Then you'll see modules.
确保单击“已安装的模块”,而不是“应用程序”。
Make sure you click 'Installed Modules', and not 'Apps'.
在 Windows 10 上对我有用的方法:
Services
创建一个新的 DB Stop Odoo--update=all
选项What worked for me on Windows 10:
Services
--update=all
option