Odoo Help


project_long_term prevents thunderbird plugin to push documents to tasks ?

HIGHCO - Nicolas Clavier
on 4/11/13, 6:44 AM 2,113 views

Hi folks,

After installing the project_long_term module, it seems that I can't push emails to conversations on tasks from thunderbird / outlook plugin. If disabling the project_long_term module, the tasks are back again in target documents to push to. NB : I have project_issues installed too, didn't try yet to disable it (in case of possible conflict).

I wonder why is this ?


Here is the answer:

To reproduce got to : Thunderbird > OpenERP Menu > Documents "document not found" Click "Push Email"

At this stage, before pushing an email, the plugin_handler.py (of the plugin module) is asked the list of supported documents to fill the Type of Document popup menu.

If you read the method's comments in the plugin_handler.py file:

def document_type(self, cr, uid, context=None):
        Return the list of available model to push
        res.partner is a special case
        otherwise all model that inherit from mail.thread
        ['res.partner', 'project.issue']
    mail_thread_obj = self.pool.get('mail.thread')
    doc_dict = mail_thread_obj.message_capable_models(cr, uid, context)
    doc_dict['res.partner'] = "Partner"
    return doc_dict.items()

You will notice that a class/model should inherit from mail.thread. Which is the case in project.task of the default project module, but project_long_term overrides project.task without inheriting mail.thread anymore !

To correct this behavior, simply patch project_long_term.py to update project_task as follows :

class project_task(osv.osv):
    _name = "project.task" #you need to give the object name in case of multiple inheritance
    _inherit = ['project.task','mail.thread', 'ir.needaction_mixin'] #this solves the issue
    _columns = {
        'phase_id': fields.many2one('project.phase', 'Project Phase', domain="[('project_id', '=', project_id)]"),

Leave the rest untouched. Restart OpenERP after upgrading the project_long_term module. Alternatively you could inherit project_task in your own module to produce the same result.

I think I might file a bug in case this wasn't omitted on purpose.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 4/11/13, 6:44 AM
Seen: 2113 times
Last updated: 3/16/15, 8:10 AM