Skip to Content
Menu
This question has been flagged
7 Replies
15181 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?

Avatar
Discard
Best Answer

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.

Avatar
Discard
Best Answer

This worked perfectly for me

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

Avatar
Discard
Best Answer

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"

 

 

Avatar
Discard
Best Answer

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>

Avatar
Discard
Best Answer

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.

Avatar
Discard
Best Answer

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.

Avatar
Discard

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.