Odoo Help


How to switch sales order line from " form mode" back to line mode?

on 9/16/14, 6:45 AM 4,025 views

Any expert can tell me why after I install openerp/odoo 7 the sales order line in Quatation and Sale Order pop up a form for entry. I would like to edit it in the line mode, what should I do?

On 5/24/16, 5:36 AM

Hi JC,

The visibility of tree or form view of the one2many field order_line in sale order form is determined by the following xml code in openerp/addons/sale/sale_view.xml,

<record id="view_order_form_editable_list" model="ir.ui.view">
    <field name="name">sale.order.form.editable.list</field>
    <field name="model">sale.order</field>
    <field name="inherit_id" ref="sale.view_order_form"/>
    <field name="groups_id" eval="[(4, ref('product.group_uos')), (4, ref('product.group_stock_packaging')), (4, ref('sale.group_mrp_properties'))]"/>
    <field name="arch" type="xml">
        <xpath expr="//field[@name='order_line']/tree" position="attributes">
            <attribute name="editable"/>

The group  "product.group_uos" stands for the "Manage Secondary Unit of Measure" in user form.

The group  "product.group_stock_packaging'" stands for the "Manage Product Packaging" in user form.

The group  "sale.group_mrp_properties'" stands for the "Properties on lines" in user form.

If you install event module, one more group will be there:

<record id="sale.view_order_form_editable_list" model="ir.ui.view">

<field name="groups_id" eval="[(4, ref('event.group_event_user'))]"/>


<record id="group_event_user" model="res.groups">

<field name="name">User</field>

<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>

<field name="category_id" ref="module_category_event_management"/>


If you enable any of these groups, you can see the form view of the sale order line. To reset to tree view, you have to disable those groups, ie., remove the user from those groups.

Thanks & Regards.

Emad Jaddou
On 7/23/15, 12:05 PM

This worked perfectly for me




| 5 4 7
Bikaner, India

OpenERP Devloper at SunARC Technology

On 9/16/14, 8:16 AM

Default Openerp 7 Sale Order Line Create or Edit record in list view mode. In xml tree view editable="bottom" code allow  to edit to in list view.


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

<tree string="Sales Order Lines" editable="bottom">

check your custom Module may be using view_order_form inherit removed  editable="bottom"




Sudhir Arya (SA)

--Sudhir Arya (SA)--
| 6 8 8
Ahmedabad, India
--Sudhir Arya (SA)--

Working as an OpenERP/Odoo developer and a Team Leader 

Top 5 Odoo contributor On Stackoverflow




Sudhir Arya (SA)
On 9/16/14, 2:42 PM

If you uncheck following access rights of the user, sale order line again will be editable from line mode.

  1. Manage Secondary Unit of Measure.
  2. Manage Product Packaging.

Here is the xml code, that deactivates to edit the line from tree.

You can use following code in your custom module to enable editing from tree/line.

<record id="view_order_form_editable_list_extended" model="ir.ui.view">
    <field name="name">sale.order.form.editable.list.extend</field>
    <field name="model">sale.order</field>
    <field name="inherit_id" ref="sale.view_order_form"/>
    <field name="arch" type="xml">
        <xpath expr="//field[@name='order_line']/tree" position="attributes">
            <attribute name="editable">top</attribute>

On 9/16/14, 8:22 AM

Form or inline mode is determined by which settings are selected in the Settings > Configuration section.  AFAIK there is no toggle or switch that determines this user interface.  Maybe someone else can add examples of which settings turn on or off the inline edit mode.

You can turn it on or off by checking or unchecking the option "Allow to define several packaging methods on products" in Setting > Configuration > Warehouse. Only the form view allows to chose a different packaging.

Linko Solutions, Corinne Cobbel
on 10/14/14, 3:58 PM
Corinne Cobbel
On 10/14/14, 3:57 PM

You can turn it on or off by checking or unchecking the option "Allow to define several packaging methods on products" in Setting > Configuration > Warehouse. Only the form view allows to chose a different packaging.

Your Answer

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

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: 9/16/14, 6:45 AM
Seen: 4025 times
Last updated: 5/24/16, 5:36 AM