Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
9509 มุมมอง

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>

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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>

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi sreejith,

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 25
1372
0
พ.ย. 24
1560
0
มิ.ย. 24
1602
1
มิ.ย. 24
2118
0
ต.ค. 23
2149