Odoo Help

3

1
14 Answers
3
Avatar

Axel Mendoza Cuba

--Axel Mendoza--
13946
| 8 8 10
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full-time employee trying to understand what to do and how

Reach me at aekroft@gmail.com

Axel Mendoza Cuba
11/17/15, 7:45 AM

I copy and paste your menuitem def and the Quotations menu get the group ok, as @Tobiasz saids check agains a user that doesn't have the group. You could also try this way:

<record model='ir.ui.menu' id='sale.menu_sale_quotations'>
<field name="groups_id" eval="[(4,ref('base.group_sale_manager'))]"/>
</record>

Also you need to check that the user that you are using to test this does not have a group assigned that inherit from base.group_sale_manager

For the menu position all depends of the sequence field so if you vary the value of that field to a value lesser than or higher than another menu sequence value the menu will be moved.

Always after a change in the menus you need to refresh the page because the menu need to reload

Hope this helps

=================================update========================================

The menu for sale orders by default have defined the groups: "base.group_sale_salesman" and "base.group_sale_manager". To left only the group "base.group_sale_manager" redefine it like this in your module:

<menuitem name="Sales Orders" id="sale.menu_sale_order" parent="base.menu_sales" groups="-base.group_sale_salesman"/>

Notice the - sign before the group name

9 Comments
Oocademy, Yenthe Van Ginneken Belgium
11/17/15, 7:52 AM

@Axel thanks for your answer! the thing is that the 'Quotations' menuitem is indeed gone but somehow it doesn't work for the 'Sales Orders' and I have no idea why. I'm testing this on a new user with just the rights 'user' for sales. Could you give my second menuitem a try too please?

Axel Mendoza Cuba
11/17/15, 7:55 AM

The default menu definition in the sale module have this two groups by default:
base.group_sale_salesman
base.group_sale_manager
You don't need to define it again

Oocademy, Yenthe Van Ginneken Belgium
11/17/15, 7:58 AM

@Axel it should only be accessible for the users in the group 'base.group_sale_manager' and not for 'base.group_sale_salesman' as it is by default.

Axel Mendoza Cuba
11/17/15, 8:09 AM

check the update in the answer

Oocademy, Yenthe Van Ginneken Belgium
11/17/15, 8:29 AM

That is amazing! I didn't even know you could invoke access rights with the '-'! Accepted & upvoted, thanks Axel.

Axel Mendoza Cuba
11/17/15, 7:07 PM

Happy to help

Odoo India
4/13/16, 1:33 AM

Hi Axel I try as per your code.... not working ...I need this same scenario

Odoo India
4/13/16, 1:37 AM

I tried this way no effect..

Odoo India
4/13/16, 1:39 AM
0
Avatar

Odoo India

--Odoo --

1531
| 6 2 9
India
--Odoo --

Working in Odoo TEchnologies

Odoo India
4/13/16, 1:40 AM

I tried like axel suggestion but not changing........


<record model='ir.ui.menu' id='sale.menu_sale_quotations'>     <field name="groups_id" eval="[(4,ref('base.group_sale_salesman'))]"/></record>      <record model='ir.ui.menu' id='sale.menu_sale_order'>     <field name="groups_id" eval="[(4,ref('base.group_sale_salesman'))]"/></record>
1 Comment
Axel Mendoza Cuba
4/17/16, 11:15 AM

Hi Dep. Yours it's not the same scenario described in the solution of this thread

Ask a Question
Keep Informed
2 follower(s)
About This Community

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

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now