Odoo Help

3

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

By
priyankahdp
on 4/11/13, 3:43 PM 7,591 views

The Question has been closed

by
Sudhir Arya (ERP Harbor Consulting Services)
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'))]"/>
8

Sudhir Arya (ERP Harbor Consulting Services)

--Sudhir Arya (ERP Harbor Consulting Services)--
11456
| 6 8 8
Ahmedabad, India
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & Co-Owner at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Positive attitude and quick Learner

• Good analytical skill, quick bug and issue tracing and find the solution

• Good knowledge and experience in payment gateway integration with Odoo

• Ready to accept new challenges

• Active Memeber On Stackoverflow 

LinkedIn

Blog

Stackoverflow

Sudhir Arya
ERP Harbor Consulting Services
skype: 
sudhir@erpharbor.com 
Sudhir Arya (ERP Harbor Consulting Services)
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 (ERP Harbor Consulting Services)
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.

Register

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)

Stats

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