Odoo Help


OpenERP ver 7 - explaination for Security.xml [Closed]

on 4/11/13, 3:43 PM 7,069 views

The Question has been closed

Sudhir Arya (SA)
on 04/18/2013 04:57:39
<?xml version="1.0" ?>
        <record model="ir.module.category" id="module_lunch_category">
            <field name="name">Lunch</field>
            <field name="description">Helps you handle your lunch needs, if you are a manager you will be able to create new products, cashmoves and to confirm or cancel orders.</field>
            <field name="sequence">16</field>
        <record id="group_lunch_user" model="res.groups">
            <field name="name">User</field>
            <field name="category_id" ref="module_lunch_category"/>
        <record id="group_lunch_manager" model="res.groups">
            <field name="name">Manager</field>
            <field name="implied_ids" eval="[(4, ref('group_lunch_user'))]"/>
            <field name="category_id" ref="module_lunch_category"/>
            <field name="users" eval="[(4, ref('base.user_root'))]"/>

I'm now stuck with security handling to my application.its code shows here

I refer documentation also for clarify the above xml code. but i'm not get good explanation for version 7 in documentation.i need to clarify below sections. please advice me to get clear idea about it

Please explain

ir.module.category means.?

<record model="ir.module.category" id="module_lunch_category">

model="res.groups" means.?

<record id="group_lunch_user" model="res.groups">

need to clarify whole below line

<field name="implied_ids" eval="[(4, ref('group_lunch_user'))]"/>
Sudhir Arya (SA)
On 4/11/13, 4:29 PM

ir.module.category is an object same as other objects in OpenERP like sal.order, purchase.order, etc. It defines category of application like Sale, Purchase, Warehouse, etc.

<record model="ir.module.category" id="module_lunch_category"> record creates a category for security group.

For example you have seen Sale, Account, Point of Sale groups inside res.users form view in Access Rights tab.

<record id="group_lunch_user" model="res.groups"> creates a group like User, Account Manager, etc.

<field name="implied_ids" eval="[(4, ref('group_lunch_user'))]"/> This means Users of this group automatically inherit those groups. It is same as inheritance.

Here, Manager group inherit security rights and roles of User group also.

You can refer point_of_sale, account or sale or purchase modules security code also.

thanks Arya.......thanks a lot :-)

on 4/12/13, 5:31 AM

How do you know this stuff? In the docs under Module Structure/XML Files mention of security.xml is curiously missing and the chapter on security says very little if anything useful at all.

on 4/16/13, 11:13 AM

Self learning and R&D. Yes, you are right there is nothing in documents about such things.

Sudhir Arya (SA)
on 4/16/13, 11:17 AM

but for to complement the aswers you need to read this, because this relation with security http://help.openerp.com/question/18704/hide-menu-for-existing-group/

wilson zauma
on 3/13/14, 1:49 PM

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.


Odoo Training Center

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

Test it now

Question tools

2 follower(s)


Asked: 4/11/13, 3:43 PM
Seen: 7069 times
Last updated: 6/21/17, 6:39 AM