Search code examples
iosodooopenerp-7openerp-8

How to create Task ( project.task ) under specific customer (res.partner ) in ODOO?


How to create Task ( project.task ) for specific customer (res.partner ) in ODOO / OpenERP ?

I am sending below input parameter for creating Task under customer :

(
Sample Database,
1,
Pass4ODOO,
project.task,
create,
{
    "categ_ids" =     (
                (
            6,
            0,
                        (
            )
        )
    );
    description = "";
    name = sample task;
    priority = 0;
    sequence = 0;
},
12
)

In above input parameter 12 is customer id. Under this customer i want to create task.

Does any body know this ?


Solution

  • You do not describe how you are interfacing with Odoo, but I looks like you are using some library performing XML-RPC calls.

    The create() API function accepts a dictionary with the data for the new record to be created.

    It looks like that the dictionary after the create, argument should also include a partner_id=12; key, instead of being an additional argument at the end of the call.