Odoo Help


This community 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.


project_long_term prevents thunderbird plugin to push documents to tasks ?

Nicolas Clavier
on 4/11/13, 6:44 AM 1,445 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 ?

Nicolas Clavier
On 4/11/13, 7:25 AM

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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)


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