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 have a column unavailable for an user in sale order line [Closed]

By
Atchuthan - Technical Consultant, Sodexis Inc
on 9/5/13, 3:32 AM 1,571 views

The Question has been closed

by
Atchuthan - Technical Consultant, Sodexis Inc
on 01/21/2014 08:27:48
Hi friendz,

Is it possible to hide the column labels of the fields in sale.order.line.

My requirement is:

I need to have no label for the fields in sale order line( but the field values should be entered i.e. order line functionality does not change)

Thanks & Regards,

Atchuthan

Are you thinking of hiding, say, the cost column? You can hide columns from people not in a specified group

kaynis
on 9/5/13, 4:32 AM

You can hide columns from set of people not in a specified group. You also hide the sale order line from certain users but why would you want to do that?

kaynis
on 9/5/13, 4:37 AM
0
kaynis
On 9/5/13, 9:16 AM

To hide the cost price in sales order line (both form and tree views) open sale_margin folder inside sale_margin_view.xml you can locate the purchase field and change it to

             <field groups="base.group_extended" name="purchase_price"/>

to

            <field groups="base.group_system" name="purchase_price"/>

This will ensure only person with admin configuration access can view this field. Alternatively, you can change it to any group you want. I should howerver warn you it is best to create a module that overrides this field and you can make your changes to your created module

1

Felipe

--Felipe--
962
| 5 3 8
Bogotá, Colombia
--Felipe--
Informatics engineer Industrial engineer
Felipe
On 9/5/13, 3:43 PM

to remove a field label, use nolabel="1" in the definition of the field, in the view you are using

For Example:

<field name="price_unit" nolabel="1"/>

Example in an inherit form view for object sale.order.line that is inside the main form view view_order_form

<record id="view_order_form_new" model="ir.ui.view">
            <field name="name">sale.order.form.new</field>
            <field name="model">sale.order</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="sale.view_order_form"/>
            <field name="arch" type="xml">
                        <xpath expr="//field[@name='order_line']/form/field[@name='price_unit']" position="replace">
                                    <field name="price_unit" nolabel="1"/>
                        </xpath>
            </field>
</record>

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 9/5/13, 3:32 AM
Seen: 1571 times
Last updated: 3/31/15, 5:36 PM