跳至內容
選單
此問題已被標幟
3 回覆
9419 瀏覽次數

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
3月 25
1284
0
11月 24
1480
0
6月 24
1549
1
6月 24
2057
0
10月 23
2108