Odoo - OpenERP - How to add Custom Modules files (arrange) by sequence in __openerp__.py file ?

Support
Support
5000
| 2 1 2
Asked on 8/21/15, 4:15 PM
0
vote
2922 Views

If you are not adding files in proper sequence you will get an error.

For example:

Wrong sequence:

 'data':[
        'view/employee_data_view.xml',
        'workflow/employee_data_workflow_view.xml',
        'security/user_groups.xml',
        'security/ir_rule.xml',
        'security/ir.model.access.csv'
    ],
    'installable':True,
    'auto_install':False
}

In above data files sequence - view & workflow files has been loaded before group and rule files. So if we are using any group defined in user_groups.xml file, in view files it will throw an error because group is still not loaded.

 

It will always be good if we can use the following sequence :

Correct Sequence:

'data':[

        'security/user_groups.xml',
        'security/ir_rule.xml',
        'workflow/employee_data_workflow_view.xml',
        'view/employee_data_view.xml',        
        'security/ir.model.access.csv'
],

Support
Support
5000
| 2 1 2
Answered on 8/21/15, 4:18 PM
0
vote

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!

Ask a Question

Keep Informed

About This Forum

This forum is for HiTechnologia Employees & just Odoo general knowledge purpose only.

Read Guidelines

Question tools

3 follower(s)

Stats

Asked: 8/21/15, 4:15 PM
Seen: 2922 times
Last updated: 8/21/15, 4:18 PM