Odoo Help


Is there a form view for purchase order lines?

on 12/12/13, 5:00 AM 3,480 views

Is there a form view for purchase order lines? how can I write notes in the pruchase_order_line?

Achraf Mhadhbi
On 1/28/16, 4:17 AM

hi you can replace existing page with your own code

<xpath expr="/form/sheet/notebook/page[1]" position="replace">

<page name="Products" string="Products">

<field nolabel="1" collaspan="2" name="order_line"





and you must replace create="false" with create ="true" so you can add and replace the fields as you want

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

<field name="name">purchase.order.line.tree.inherit</field>

<field name="model">purchase.order.line</field>

<field name="inherit_id" ref="purchase.purchase_order_line_tree" />

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

<tree string="Purchase Order Lines" create="false" position="replace">

<tree string="Purchase Order Lines" create="true">

<field name="name" /> 

<field name="price_unit" />

<field name="product_qty" />

<field name="product_uom" groups="product.group_uom" />

<field name="price_subtotal" />

<field name="date_planned" widget="date" width="135" />





Ashif Abdulrahman
On 12/12/13, 6:15 AM

yes..this is the form view...located in purchase module in th file purchase_view.xml

<record id="purchase_order_line_form" model="ir.ui.view">
            <field name="name">purchase.order.line.form</field>
            <field name="model">purchase.order.line</field>
            <field name="arch" type="xml">
                <form string="Purchase Order Line" version="7.0">
                                <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/>
                                <label for="product_qty"/>
                                    <field name="product_qty" on_change="onchange_product_id(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id,parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)" class="oe_inline"/>
                                    <field name="product_uom" groups="product.group_uom" on_change="onchange_product_uom(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)" class="oe_inline"/>
                                <field name="price_unit"/>
                                <field name="taxes_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
                                <field name="date_planned" widget="date"/>
                                <field name="account_analytic_id" colspan="2" groups="purchase.group_analytic_accounting"/>
                                <field name="company_id" groups="base.group_multi_company" widget="selection"/>
                        <page string="Notes">
                            <field name="name"/>
                        </page><page string="Invoices and Receptions">
                            <field name="invoice_lines"/>
                            <field name="move_ids"/>

Thanks Ashif! But, how can I get it to open? The only way I have to write a new line or modify an existing one is in the purchase order window. I don't know what to do to open the purchase order line view form you indicate.

Thanks again!


on 12/12/13, 7:59 AM
Julio Serna
On 12/12/13, 1:38 PM

You can see purchase order line in:

Purchase / Invoice Control / On Purchase Order Line

Best Regards

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 12/12/13, 5:00 AM
Seen: 3480 times
Last updated: 9/1/17, 8:24 AM