It is currently Sun Feb 12, 2012 8:23 am

All times are UTC + 2 hours




Post new topic Reply to topic  [ 46 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: [Solved] displaying/hiding a tab depending of the user
PostPosted: Wed Jul 01, 2009 9:52 pm 
Offline

Joined: Tue Aug 14, 2007 4:08 pm
Posts: 360
Hello all,
Because of sensitive data, I need to show/hide a tab of a form depending of the user. Is there a way to do that ?

Per advance, thanks for your help
Arnaud


Last edited by forstera on Mon Sep 21, 2009 9:44 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 02, 2009 7:19 am 
Offline

Joined: Thu May 29, 2008 12:58 pm
Posts: 208
Location: Gandhinagar,Gujarat,India
Hello,

You can create groups .

_________________
Regards,
Naresh Choksy


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 02, 2009 7:36 am 
Offline

Joined: Tue Aug 14, 2007 4:08 pm
Posts: 360
Hello,
thanks for your answer. Yes, I can create a group and put my users inside but the problem remains : how can I 'say' when the group xxx opens my form partner, hide tab account ?
thanks four your help


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 02, 2009 7:41 am 
Offline

Joined: Thu May 29, 2008 12:58 pm
Posts: 208
Location: Gandhinagar,Gujarat,India
forstera wrote:
Hello,
thanks for your answer. Yes, I can create a group and put my users inside but the problem remains : how can I 'say' when the group xxx opens my form partner, hide tab account ?
thanks four your help


create the group and assign that group to the user that you want can see the tab.
You can then put that group on the tab in the view.xml
so the user who does not belong to that group the tab will be hidden.

_________________
Regards,
Naresh Choksy


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 02, 2009 8:33 am 
Offline

Joined: Tue Aug 14, 2007 4:08 pm
Posts: 360
Ok, I see the idea. As I'm a beginner in the objects manipulation, I'm going to search the correct syntax to do that ...
If I understand well, I have to manage a specific view of the form (the one that add the Account tab) and not the Customizing object option ?

I thank you very much for your help
Arnaud


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 02, 2009 8:51 am 
Offline

Joined: Tue Aug 14, 2007 4:08 pm
Posts: 360
Ok, I've found the view which displays the tab. I can manage it and display the groups who have an access to it but I can't modify this (using the web client).. i think there's another way but I don't know it ...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 02, 2009 8:59 am 
Offline

Joined: Thu May 29, 2008 12:58 pm
Posts: 208
Location: Gandhinagar,Gujarat,India
hello,

If you just want to test then you can direclty modify using view editor in web client and in GTK client going through the menu administration/Customization/User Interface/Views

Or if you need to modify through code then just inherit the view and modify.

_________________
Regards,
Naresh Choksy


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 02, 2009 9:34 am 
Offline

Joined: Tue Aug 14, 2007 4:08 pm
Posts: 360
Thank you very much Naresh,
I'mtrying that but I get another problem when editing using the web client. when I'm trying to customize my view, under the Acces Righs tab, when editing a group or trying to add a new record, I get the following error : Records were modified in the meanwhile..
So, I'm going to try first to understand where does this problem comes from and then I could manage the Access Rights on it.

I thank you very very much for your help :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 02, 2009 3:43 pm 
Offline

Joined: Tue Aug 14, 2007 4:08 pm
Posts: 360
Hello Naresh,
I'd like to modify through the code, can you help me with the syntax ?
Do I need to use the attrs function ?

Per advance, thanks a lot for your help


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 02, 2009 4:02 pm 
Offline

Joined: Thu May 29, 2008 12:58 pm
Posts: 208
Location: Gandhinagar,Gujarat,India
hello,
first of all you should have the basic knowledge of creating module. If so then you can do like
<record>
<field>your view name</field>
<field>form</field>
<field>model name</field>
<field>
<field>
<notebook>
<page>
copy the base view and paste here
</page>
</notebook>
</field>
</record>

_________________
Regards,
Naresh Choksy


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 02, 2009 4:14 pm 
Offline

Joined: Tue Aug 14, 2007 4:08 pm
Posts: 360
ok, till there, no problem; i already made some herited custom views :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 02, 2009 4:17 pm 
Offline

Joined: Thu May 29, 2008 12:58 pm
Posts: 208
Location: Gandhinagar,Gujarat,India
hello,
So now where did you got stuck.
can you paste your code.

_________________
Regards,
Naresh Choksy


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 02, 2009 4:18 pm 
Offline

Joined: Tue Aug 14, 2007 4:08 pm
Posts: 360
i dont know how to say : if user_group = employee than dont display notebook 'account'


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 02, 2009 4:20 pm 
Offline

Joined: Tue Aug 14, 2007 4:08 pm
Posts: 360
the view i wouldn'like to display when the user is member of employee is : res.partner.property.form.inherit ...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 03, 2009 7:17 am 
Offline

Joined: Thu May 29, 2008 12:58 pm
Posts: 208
Location: Gandhinagar,Gujarat,India
Hello,

So as you said you have created the inherited view. SO through code this the procedure only. Now if still you are not able to accomplish the task then
Can you please paste your code so that I can trace and see where you got stuck.

_________________
Regards,
Naresh Choksy


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 46 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP