Odoo Help


Error ValueError: Wrong value for inward.item_category: in one2many field

Anas Ali
on 8/20/15, 2:44 PM 1,820 views

ValueError: Wrong value for inward.item_category: {u'time_in': False, u'vehicle_type': False, u'lc': False, u'vehicle': False, u'invoice_ref': False, u'bilty': False, u'date': False, u'gin': False, u'time_out': False, u'document_type': False, u'id': False, u'supplier_details': False}

.py file

class inwardpass(models.Model):


date = fields.Date('Date', required=True)

document_type = fields.Boolean('LC or PO')

invoice_ref = fields.Char('Invoice Ref #')

gin = fields.Char('GIN #')

lc = fields.Char('LC Ref.#/PO #')

bilty = fields.Char('Bilty ')

time_out = fields.Date('Time Out', required=True)

vehicle = fields.Char('Vehicle')

time_in = fields.Date('Time In', required=True)

vehicle_type = fields.Char('Vehicle Type')

supplier_details= fields.Char('Supplier Details')

Details = fields.One2many('inward','item_category',ondelete='cascade')

class inward(models.Model):

_name = 'inward'

item_category = fields.One2many('inwardpass','Details','Item Category')

uom = fields.Char('UOM')

qty = fields.Char('QTY')

item = fields.Char('Item Category')

XML file

<notebook position="after">

<page string="Details">

<group col="4" colspan="4" string="General">

<field name="Details"  >


<field name="item" placeholder="Item Category" />

<field name="uom" placeholder="UMO"/>

<field name="qty" placeholder="Quantity"/>






--Ahmed M.Elmubarak--

Ahmed M.Elmubarak
On 8/23/15, 10:04 AM


In one2many field you should have a many2one field as inverse name in the related model. which you haven't,

your two fields with types One2many, kindly check this link for more details


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: 8/20/15, 2:44 PM
Seen: 1820 times
Last updated: 8/23/15, 10:04 AM