تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
9411 أدوات العرض

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
مارس 25
1281
0
نوفمبر 24
1476
0
يونيو 24
1547
1
يونيو 24
2050
0
أكتوبر 23
2105