Horje
add fields in sale order line Code Example
add fields in sale order line
For that you need to inherit sale.order.line object and use
xpath to display in sale order form view. 

In PY:-

class SaleOrderLine(models.Model):

     _inherit = 'sale.order.line'



     x_field = fields.Char('X Field')



In Xml:-

<record model="ir.ui.view" id="sale_order_view_inherit">
    <field name="name">sale.order.view.inherit1</field>
    <field name="model">sale.order</field>
    <field name="inherit_id" ref="sale.view_order_form"/>
    <field name="arch" type="xml">
        <xpath expr="/form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='name']" position="after">
            <field name="x_field"/>
        </xpath>
    </field>
</record>



This fields shows after Description in the sale order line.



Hope it will helps you.

Thanks,




Html

Related
how to add public_html Code Example how to add public_html Code Example
nuxt for  background color Code Example nuxt for background color Code Example
html long text input Code Example html long text input Code Example
is html easy? Code Example is html easy? Code Example
https://api.github.com/search/issues?q=windows+label:bug+language:python+state:open&sort=created&order=asc Code Example https://api.github.com/search/issues?q=windows+label:bug+language:python+state:open&sort=created&order=asc Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7