Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
9471 Lượt xem

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"/>

</xpath>

</field>

</record>

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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"/>

</xpath>

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi sreejith,

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 25
1342
0
thg 11 24
1526
0
thg 6 24
1567
1
thg 6 24
2078
0
thg 10 23
2136