Odoo Help


error on custom module AttributeError: 'NoneType' ?

mirko lazzarini
on 8/23/13, 1:43 PM 3,389 views

When i install my module i obtain this error....

File "/usr/lib/pymodules/python2.6/openerp/modules/loading.py", line 256, in load_marked_modules loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) File "/usr/lib/pymodules/python2.6/openerp/modules/loading.py", line 165, in load_module_graph init_module_models(cr, package.name, models) File "/usr/lib/pymodules/python2.6/openerp/modules/module.py", line 374, in init_module_models result = obj._auto_init(cr, {'module': module_name}) File "/usr/lib/pymodules/python2.6/openerp/osv/orm.py", line 3147, in _auto_init if dest_model._table != 'ir_actions': AttributeError: 'NoneType' object has no attribute '_table'


{ 'name': 'Project Management Extension', 'version': '0.1', 'author': 'xxx S.r.l.', 'website': '', 'category': '', 'sequence': 8, 'summary': '', 'images': [ ], 'depends': [ "project" ], 'description': [ "Project Management Extension"], 'data': [ 'qms_project_view.xml' ], 'installable': True, 'auto_install': False, 'application': True, }



import time import datetime

from openerp.osv import fields, osv from openerp.tools.translate import _

class Project(osv.osv): '''Project''' _name = "project.project" _inherit = 'project.project'

_columns = {
    'type_id': fields.many2one('project.type', string='Typology'),
    'legacy_project_code': fields.char('Project Code',size=250),
    'redmine_project': fields.char('Redmine project',size=250),
    'sales_order_id': fields.many2one('sale.order',string='Sale Order'),
    'purchases_order_ids': fields.many2one('purchase.order',string='Purchase Order'),
    'qms_documents_ids': fields. many2one('project.qms.document',string='Documents'),


class project_task_type(osv.osv): '''project_task_type''' _name = "project.task" _inherit = 'project.task'

_columns = {

    'qms_testing_approval': fields.many2one('project.qms.document', string='Approval Document'),



class Project_Type(osv.osv): '''Project_Type''' _name = 'project.type'

_columns = {
    'name': fields.char('Project Code',size=250),
    'description': fields.text('Description'),
    'qms_code': fields.char('Qms Code',size=250),
    'active': fields.boolean('Active'),



<openerp> <data>

<record model="ir.ui.view" id="edit_project"> <field name="name">project.project.form</field> <field name="model">project.project</field> <field name="type">form</field> <field name="inherit_id" ref="project.edit_project"/> <field name="arch" type="xml"> <field name="user_id" position="after"> <field name="type_id"/> <field name="sales_order_id"/> </field> <notebook> <page string="QMS">

                        <field name="legacy_project_code" string="Project code"/>
                    <field name="redmine_project" string="Redmine project" />




I've another problem... i can't output label in this layout

        <page string="QMS">

                        <field name="legacy_project_code" string="Project code"/>
                    <field name="redmine_project" string="Redmine project" />


Could anyone help me?

Riyaj Pathan
On 8/24/13, 5:37 AM

this is a dependency issue. In your custom module, you have inherited class and added two many2one fields referring to "sale.order" and "purchase.order" but neither your custom module nor built-in project module depends on sale and purchase module. i.e. you are accessing class without having dependency.

Hope this helps.

thx have you solution about my second problem about output label in .xml?

mirko lazzarini
on 8/24/13, 8:16 AM
widiana juniar
On 7/1/14, 10:00 PM

I haved same issue, and fix when i try this solution , thanks for Riyaj and Thierry

On 7/23/14, 12:45 AM

And you must add them in _openerp_.py : 'depends': [ "project", "sale", "purchase" ],

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.


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

1 follower(s)


Asked: 8/23/13, 1:43 PM
Seen: 3389 times
Last updated: 3/16/15, 8:10 AM