Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
9503 Zobrazení

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>

Avatar
Zrušit
Nejlepší odpověď

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>

Avatar
Zrušit
Nejlepší odpověď

Hi sreejith,

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

Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
bře 25
1368
0
lis 24
1547
0
čvn 24
1598
1
čvn 24
2111
0
říj 23
2146