Odoo Help

Welcome!

This community 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.

0

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

By
JC
on 9/16/14, 6:45 AM 3,638 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?

1
nikesh
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"/>
        </xpath>
    </field>
 </record>

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>

<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"/>

</record>



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.

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

This worked perfectly for me

https://www.odoo.com/forum/help-1/question/remove-order-line-details-window-69110

0

Prakash

--Prakash--
3173
| 5 4 7
Bikaner, India
--Prakash--

OpenERP Devloper at SunARC Technology

Prakash
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.

sale/sale_view.xml

<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"

 

 

0

Sudhir Arya (SA)

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

Working as an OpenERP/Odoo developer and a Team Leader 

Top 5 Odoo contributor On Stackoverflow

LinkedIn

Blog

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>
        </xpath>
    </field>
</record>

0
paul
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
0
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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 9/16/14, 6:45 AM
Seen: 3638 times
Last updated: 5/24/16, 5:36 AM