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.

0

Adding A Group To A Custom Module

By
Alex Gallien
on 10/29/14, 6:19 PM 513 views

Hi All,

I am looking to add a group to a custom module so that I can control access to various menus. I modeled my code after the purchases module, but am not seeing the group under settings. Is there any documentation on how to code groups into modules? Here is the code I have now:

ec_purchases_security.xml:

<?xml version="1.0" encoding="utf-8"?>

<openerp>

<data noupdate="0">

 

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

        <field name="name">Electrochem Purchasing</field>

        <field name="category_id" ref="base.module_category_purchase_management"/>

        <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>

    </record>

</data>

</openerp>

ir.model.access.csv:

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink

access_purchase_order,purchase.order,model_purchase_order,group_ec_purchase,1,1,1,1

Any idea why this isn't loading? I'm not getting any error messages. I was sure to add 'ir.model.access.csv' and 'ec_purchases_security.xml' to the 'data' field in __openerp__.py

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/29/14, 6:19 PM
Seen: 513 times
Last updated: 3/16/15, 8:10 AM