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.

1

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

By
priyankahdp
on 4/11/13, 3:43 PM 6,099 views

The Question has been closed

by
Sudhir Arya (SA)
on 04/18/2013 04:57:39
<?xml version="1.0" ?>
<openerp>
    <data>
        <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>
        <record id="group_lunch_user" model="res.groups">
            <field name="name">User</field>
            <field name="category_id" ref="module_lunch_category"/>
        </record>
        <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'))]"/>
        </record>
    </data>
</openerp>

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'))]"/>
6

Sudhir Arya (SA)

--Sudhir Arya (SA)--
10150
| 6 8 8
Ahmedabad, India
--Sudhir Arya (SA)--

Working as an OpenERP/Odoo developer and a Team Leader 

Top 5 Odoo contributor On Stackoverflow

LinkedIn

Blog

Stackoverflow

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 :-)

priyankahdp
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.

mike
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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/11/13, 3:43 PM
Seen: 6099 times
Last updated: 3/16/15, 8:10 AM