Search
 
SCRIPT & CODE EXAMPLE
 

HTML

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,
Comment

PREVIOUS NEXT
Code Example
Html :: htaml p 
Html :: html span 
Html :: read only textview nativescript 
Html :: Two way binding html templatevue js 
Html :: file read from outbox 
Html :: how to make a head tag in html into a child element 
Html :: html jump to section 
Html :: how to delete an activity andriod 
Html :: formspree 
Html :: linq card html 
Html :: el barka mouse 
Html :: how to add horizontal line in html without css 
Html :: twig check if variables iterable 
Html :: cron job visit url each 15 min cpanel 
Html :: url to html converter 
Html :: how to remove default padding of h1 h2 h3 h4 h5 h6 .h1 .h2 .h3 .h4 .h5 .h6 tag 
Html :: How to add countdown timer lock in blogger 
Html :: embed live crypto transactions map across multiple wallets and exchanges 
Html :: Laravel 5: Mostrar HTML con Blade 
Html :: Style 
Html :: Using aria-valuetext 
Html :: how to make body element in html 
Html :: allow <= 20 characters in search engine snippets 
Html :: fab model 
Html :: attribute meaning 
Html :: Restream html5 video player 
Html :: composer require misterphilip/maintenance-mode 
Html :: bootsrap loader 
Html :: input date de naissance 
Html :: how to get a result in the input form 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =