Odoo Help


Create tasks on SO: Double product name/description

on 5/23/13, 12:19 PM 2,007 views

I am using the field 'description_sale' to automatically enter some fixed information about certain products in my SO. This is working well, and our sale orders are a lot less hassle this way.

Now, I am also using the module: "Create tasks on SO". This module is working properly and creating tasks for products which conform to the requirements. (MTO, service, produce)

The only bad thing is: instead of taking the product name/description once - it keeps pushing the same thing twice to my task. The field 'description' in the table project.task is storing the same information twice. So one field is containing all the information, and I can't rectify this by editing my view.

Does anyone know how/why the description of my product is duplicated in the description of my task? Or how to fix this?


image descriptionimage description

On 5/27/13, 10:03 AM

In the module project_mrp edit project_procurement.py with a text editor.

Change 'description': procurement.name + '\n' + (procurement.note or ''), into 'description': procurement.name,


def action_produce_assign_service(self, cr, uid, ids, context=None):
    project_task = self.pool.get('project.task')
    for procurement in self.browse(cr, uid, ids, context=context):
        project = self._get_project(cr, uid, procurement, context=context)
        planned_hours = self._convert_qty_company_hours(cr, uid, procurement, context=context)
        task_id = project_task.create(cr, uid, {
            'name': '%s:%s' % (procurement.origin or '', procurement.product_id.name),
            'date_deadline': procurement.date_planned,
            'planned_hours': planned_hours,
            'remaining_hours': planned_hours,
            'partner_id': procurement.sale_line_id and procurement.sale_line_id.order_id.partner_id.id or False,
            'user_id': procurement.product_id.product_manager.id,
            'procurement_id': procurement.id,
    --->    'description': procurement.name + '\n' + (procurement.note or ''),
            'project_id':  project and project.id or False,
            'company_id': procurement.company_id.id,
        self.write(cr, uid, [procurement.id], {'task_id': task_id, 'state': 'running', 'message':_('Task created.')}, context=context)            
    self.project_task_create_note(cr, uid, ids, context=context)

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 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: 5/23/13, 12:19 PM
Seen: 2007 times
Last updated: 3/16/15, 8:10 AM