Odoo Help


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.


How to hide margin in sale view for specific user ?

on 6/4/13, 3:02 PM 1,288 views

Please, you know how to hide margin for sale for specific user? I do not know where I need to change in view sale_view.xml ? I can not get the fields in this view


Hiral Patel (hip)

--Hiral Patel (hip)--
Tiny ERP Pvt Ltd
| 2 1 5
--Hiral Patel (hip)--

Hiral Patel (hip)
On 6/5/13, 5:13 AM

In Version 7.0 and trunk you have to modify in sale_margin -> sale_margin_view.xml

There are two ways to do this :

  1. Using group : Create a group and add all the users to whom you want to display that field and add this group to 'margin' field. Example : <field name="margin" groups="base.group_user"/>

  2. Using attrs : (This is static one) You can use attrs="{'invisible': [('user_id', '=', uid)]}" In place of uid you have to pass the user_id for user you want to hide the field. Example : <field name="margin" attrs="{'invisible': [('user_id', '=', 1)]}"/>

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

1 follower(s)


Asked: 6/4/13, 3:02 PM
Seen: 1288 times
Last updated: 3/16/15, 8:10 AM