Skip to Content
Menu
This question has been flagged
2 Replies
3061 Views

xml detail:

<?xml version="1.0" encoding="UTF-8" ?>

<odoo>

    <record model="ir.ui.view" id="delivery_order_form_inherit_related2">

        <field name="name">delivery.order.form.inherit_related2</field>

        <field name="model">stock.picking</field>

        <field name="inherit_id" ref="stock.view_picking_form"/>

        <field name="arch" type="xml">

            <xpath expr="/form/sheet/notebook/page/field[@name='move_lines']/kanban/field[@name='product_uom_qty']" position="before">

                <field name="x_test2" string="Serial Number"/>

            </xpath>

        </field>

    </record>

</odoo>


Python Code:

from odoo import models, fields

class StockMove(models.Model):
_inherit = 'stock.move'
x_test2 = fields.Text(string="Test")
Avatar
Discard
Author Best Answer

@subharo I have tried but it errors.

ParseError: "Error while validating constraint

Element '<xpath expr="/form/sheet/notebook/page/field[@name='move_lines']/tree/field[@name='product_uom_qty']">' cannot be located in parent view

ParseError: "Error while validating constraint

Element '<xpath expr="/form/sheet/notebook/page/field[@name='move_lines']/form/field[@name='product_uom_qty']">' cannot be located in parent view

Avatar
Discard
Best Answer

<xpath expr="/form/sheet/notebook/page/field[@name='move_lines']/tree/field[@name='product_uom_qty']" position="before"> 

     <field name="x_test2" string="Serial Number"/>

</xpath>


Or

<xpath expr="/form/sheet/notebook/page/field[@name='move_lines']/form/field[@name='product_uom_qty']" position="before"> 

     <field name="x_test2" string="Serial Number"/>

</xpath>


If not working these please try, stock move have separate tree view (which is not defined on picking)

Avatar
Discard
Related Posts Replies Views Activity
0
Dec 24
59
1
Jun 24
1914
1
Jun 22
3471
5
Dec 19
5344
1
Feb 19
3722