Inherit product.product and add field which you want to add.
then inherit the view of purchase order form which is purchase_order_form and then in the tree view of order_line field add your field.
_inherit = 'product.product'
custom_field = fields.Float('Field Name')
<record id="inherit_purchase_order_form_view" model="ir.ui.view">
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml">
<xpath expr="/form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='name']" position="after">
Hope it works for you.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 1/6/16, 11:47 PM|
|Seen: 299 times|
|Last updated: 1/7/16, 3:09 AM|