Odoo Help


how to add field to sales>> order lines

on 9/7/16, 7:25 AM 1,366 views

Add the Ship field as a drop down list field of the Ship object to the order lines next to quantity

i tried this code but it gives an error

** ParseError: "ValidateError

Field(s) `arch` failed against a constraint: Invalid view definition

Error details:

Field `origin` does not exist


<record model="ir.ui.view" id="ship_orderline">

<field name="model">sale.order.line</field>

<field name="name">sale.tree.orderline</field>

<field name="inherit_id" ref="sale.view_order_form"/>

<field name="arch" type="xml">

<xpath expr="//field[@name='order_line']/tree/field[@name='product_uom_qty']" position="before">

<field name="ship"/>




On 12/14/16, 1:02 AM

Hi ,

try it this one 

<xpath expr="//notebook/page/field[@name='order_line']/tree[@string='Sales Order Lines']/field[@name='product_uom_qty']" position="before">

<field name="ship"/>


Divyang Jariwala
On 9/8/16, 2:08 AM

Hi sreejith,

Here all things seems perfect. if you don't added 'sale' module in depends then add it.

Sunny Dabgar
On 10/6/16, 12:14 AM

Your model should be 'sale.order' not a 'sale.order.line' and make sure view id should bu unique

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

2 follower(s)


Asked: 9/7/16, 7:25 AM
Seen: 1366 times
Last updated: 3/4/17, 5:19 AM