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

Problem with permissions in developed module

By
Javier Fuentes
on 9/6/13, 9:00 AM 2,137 views

I am finding problems when setting the permissions of an own created module. When inserting permissions lines in the ir.model.access.csv file, I keep getting this error:

Line 1 : No matching record found for external id 'model_crm_partner_tracking' in field 'Object'

The line included in system/ir.model.access.csv is as follows:

"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_cbk_crm_partner_tracking_manager","access_cbk_crm_partner_tracking_manager", "model_crm_partner_tracking", "base.group_sale_manager",1,1,1,1

And the class is:

class crm_partner_tracking (osv.osv):       
    _name = "crm.partner.tracking"  
    _columns = {        
        'partner_id': fields.many2one("res.partner", string="Partner", ondelete="CASCADE"), 
        'note': fields.char('Note', required=True),        
        'note_date' : fields.date('Note date', required=True),
    }    
crm_partner_tracking()

The content of the __openerp__.py is:

{
    'name': 'CRM Information',
    'version': '0.1',      
    'images': [],    
    'depends': ['sale','sale_commission'],
    'category': 'CRM',
    'sequence': 23,
    'demo': [],
    'update_xml': [                   
        'partner_view.xml',  
        'security/ir.model.access.csv',                       
    ],
    'test': [],
    'installable': True,
    'auto_install': False,
    'css': [],
}

Do you have any idea of what am I doing wrong?

2
Javier Fuentes
On 9/24/13, 5:46 AM

Found the solution!

It seems that the blank spaces in .csv file (before "model_crm_partner_tracking" and "base.group_sale_manager") were causing the problem:

"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" "access_cbk_crm_partner_tracking_manager","access_cbk_crm_partner_tracking_manager", "model_crm_partner_tracking", "base.group_sale_manager",1,1,1,1

1

Hi

In OpenERP v7, the line "crm_partner_tracking()" is useless. You load the "partner_view.xml" file before the "security/ir.model.access.csv" file, Have you another record which are not a view, action or menu

Hi, thank you for your answer. I tried to change the order of load (loading first the .csv file) and the problem persists. There are no more records (apart from the view). The only thing that has not been mentioned in the question is the existence of some other classes in the .py file apart from crm_partner_tracking.

Javier Fuentes
on 9/10/13, 9:01 AM

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

0 follower(s)

Stats

Asked: 9/6/13, 9:00 AM
Seen: 2137 times
Last updated: 3/16/15, 8:10 AM