Odoo Help


TypeError: cannot convert dictionary update sequence element #0 to a sequence

on 9/5/16, 7:11 AM 959 views


def action_purchase_order(self):

    rec= self.env['purchase.order'].create({

        'partner_id' : self.vendors.id,

        'store_id' : self.store_id.id,

        'purchase_order_type' : self.order_type.id,

        'date_order' : self.date_order.id,

        'product_id' : self.product_id.id,

        'date_planned' : self.date_order.id,

        'product_qty' : self.name.id,

        'brand_id' : self.brand_id.id,

        'product_id' : self.product_id.id,

        'part_number': self.part_number.id,

        'date_planned' : self.date_order.id,

        'product_qty' : self.quantity_no.id,


    return rec

pls identify the mistake!!!!!

ayman mohammed adam
On 9/6/16, 5:57 AM

dear jithin

I think you must replace @api.model to @api.one

I hope I helped you ...

thanks ayman i got the answer.

@api.model to @api.multi

on 9/6/16, 6:25 AM


ayman mohammed adam
on 9/6/16, 7:58 AM
Divyang Jariwala
On 10/27/16, 1:07 AM

Hello Jithin

Simplification for you doubt.

@api.model is used when you don't have a record set (ID of record) in self.
@api.multi or @api.one is used when you have a record set with self.

I Hope now you are clear with this. :) 

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

1 follower(s)


Asked: 9/5/16, 7:11 AM
Seen: 959 times
Last updated: 11/11/16, 5:28 AM