I have a custom Module that adds functionality to Instant Messaging [im_chat]. And naturally my module depends on [im_chat] being installed.
Eventhough [im_chat] is installed, still I get an error message when I want to install my Module [im_chat_history] that somewhat implies [im_chat] was not installed
2014-10-23 13:20:39,427 1691 CRITICAL odoo-8_test openerp.modules.module: Couldn't load module im_chat_history
2014-10-23 13:20:39,427 1691 CRITICAL odoo-8_test openerp.modules.module: No module named im_chat
I have an __init__.py in my Module that imports the im_chat Module
__init__.py
import im_chat
And it looks to me (having no skills of coding and/or python) odoo fails to do that (importing im_chat).
Does anybody has a hint, what could be wrong here?
============== the code =======================
im.py
from openerp.osv import fields,osv
class im_history(osv.osv):
_inherit = 'im.message'
im_history()
im_view.xml
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_im_history" model="ir.ui.view">
<field name="name">im.message.tree</field>
<field name="model">im.message</field>
<field name="arch" type="xml">
<tree string="IM">
<field name="date"/>
<field name="from_id"/>
<field name="to_id"/>
<field name="message"/>
</tree>
</field>
</record>
<!-- Top menu item -->
<menuitem name="IM"
id="im_history_root"
groups="base.group_user"
sequence="10"/>
<record id="open_view_im_history" model="ir.actions.act_window">
<field name="name">Instant messaging history</field>
<field name="res_model">im.message</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_im_history"/>
</record>
<menuitem name="Actions" id="im_history" parent="im_history_root" groups="base.group_user"/>
<menuitem action="open_view_im_history" id="menu_open_view_im_history" parent="im_history" sequence="20" groups="base.group_user"/>
</data>
</openerp>
__init__.py
import im
__openerp__.py
{
"name" : "Instant messaging history",
"version" : "1.1",
"author" : "L",
"category" : "Generic Modules/Messaging",
"website" : "-",
"description": "Adds history view to instant messaging module.",
"depends" : ["im_chat"],
"init_xml" : [],
"update_xml" : ["im_view.xml"],
"installable": True
}
I had some similar errors with custom modules while putting the python dependencies at __openerp__.py Removing those dependencies from __openerp__.py fixed the problem for me. Hope it could help you too.. Cheers
apparently that was not it. Removed a line that lists the dependency of [im_chat] but still get the same error File "/opt/odoo/odoo-server/addons-custom/im_chat_history/__init__.py", line 1, in import im_chat ImportError: No module named im_chat