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

Groups on module installation [Closed]

By
Luis Domingues
on 4/17/13, 7:24 AM 1,514 views

The Question has been closed

by
Sudhir Arya (SA)
on 04/18/2013 05:08:08

Hello,

I create my own module, and I need to have groups.

I have the ir.model.access.csv like this:

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
"access_perso_schedule","staff.scheduler","personal_schedule","group_staff_management_user",1,1,1,1

And I have the group on the xml view like this:

<menuitem name="Personal Schedule" sequence="21" id="personal_schedule" action="show_personal_schedule" parent="menu_staff_planification" groups="group_staff_management_user"/>

So if I add the security after the installation, it works, but if I want to intall all in one, I always have an error, in the process of ir.model.access, or on the xml view.

I found on the internet theory about, but not a good example.

Have you an idea, or good links to manage groups?

My Error is:

"No matching record found for external id 'personal_schedule' in field 'Object'."

My __openerp__.py is:

{
"name" : "Staff Management",
"version" : "0.1",
"author" : "Luis Domingues & Romain Monnard",
"category" : "Tools",
"description" : "Management of time and task of staff.",
"depends" : [
    'base',
    'web_calendar'
],
"js": [
    'static/lib/dhtmlxscheduler_timeline.js',
    'static/*/js/*.js'
],
"css": ['static/*/css/*.css'],
"init_xml" : [],
"demo_xml" : [],
"data" : [
    'security/staff_management_security.xml',
    'security/ir.model.access.csv',
    'staff_management.xml',
    'staff_tasks.xml',
    'staff_comment_type.xml',
    'staff_authorization.xml',
    'staff_comments.xml',],
"installable" : True,
"active" : False,
"qweb" : ['static/*/xml/*.xml']

}

Thanks.

What error are you facing?

Sudhir Arya (SA)
on 4/17/13, 7:29 AM

"No matching record found for external id 'personal_schedule' in field 'Object'."

Luis Domingues
on 4/17/13, 7:30 AM
3

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/17/13, 7:36 AM

In your ir.model.access.csv file you must use model_staff_scheduler instead of personal_schedule.

For example in purchase:

access_purchase_order,purchase.order,model_purchase_order,group_purchase_user,1,1,1,1

Here model_id is given as model_object_name.

Thanks, it works.

Luis Domingues
on 4/17/13, 8:18 AM

My pleasure.

Sudhir Arya (SA)
on 4/17/13, 8:19 AM
0

Francesco OpenCode

--Francesco OpenCode--
3608
| 5 7 9
Grottaglie, Italy
--Francesco OpenCode--

Italian Odoo (OpenERP) Modules Developer LINKEDIN: http://www.linkedin.com/in/francescoapruzzese

Francesco OpenCode
On 4/17/13, 7:27 AM

Are you sure you're import the file in this order:

group.xml

ir.model.access.csv

in your __openerp__.py file?

Yes, my error is:

"No matching record found for external id 'personal_schedule' in field 'Object'."

Like OpenERP need the id on the xml view, but he don't find him.

Luis Domingues
on 4/17/13, 7:28 AM

Can you paste your __openerp__.py file content, please?

Francesco OpenCode
on 4/17/13, 7:31 AM

I paste it on the main question.

Luis Domingues
on 4/17/13, 7:33 AM

Try this line: "access_perso_schedule","staff.scheduler","model_personal_schedule","group_staff_management_user",1,1,1,1

Francesco OpenCode
on 4/17/13, 7:42 AM

About This Community

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

Question tools

0 follower(s)

Stats

Asked: 4/17/13, 7:24 AM
Seen: 1514 times
Last updated: 3/16/15, 8:10 AM