Skip to Content
Menu
This question has been flagged
1 Reply
12294 Views

Hi All,


          when  i install  discuss model  in odoo 10  show  these  error  message:

         :Traceback (most recent call last):

  File "/opt/odoo/odoo/odoo/http.py", line 638, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo/odoo/http.py", line 675, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/odoo/odoo/http.py", line 331, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo/odoo/service/model.py", line 119, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo/odoo/http.py", line 324, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/odoo/odoo/http.py", line 933, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo/odoo/http.py", line 504, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/odoo/addons/web/controllers/main.py", line 866, in call_button
    action = self._call_kw(model, method, args, {})
  File "/opt/odoo/odoo/addons/web/controllers/main.py", line 854, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/odoo/odoo/api.py", line 681, in call_kw
    return call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo/odoo/odoo/api.py", line 672, in call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/odoo/odoo/addons/base/module/module.py", line 410, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "/opt/odoo/odoo/odoo/addons/base/module/module.py", line 484, in _button_immediate_function
    modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "/opt/odoo/odoo/odoo/modules/registry.py", line 78, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/opt/odoo/odoo/odoo/modules/loading.py", line 339, in load_modules
    loaded_modules, update_module)
  File "/opt/odoo/odoo/odoo/modules/loading.py", line 237, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/opt/odoo/odoo/odoo/modules/loading.py", line 136, in load_module_graph
    registry.init_models(cr, model_names, {'module': package.name})
  File "/opt/odoo/odoo/odoo/modules/registry.py", line 315, in init_models
    model._auto_init()
  File "/opt/odoo/odoo/odoo/models.py", line 2503, in _auto_init
    self._init_column(name)
  File "/opt/odoo/odoo/odoo/models.py", line 2273, in _init_column
    value = field.default(self)
  File "/opt/odoo/odoo/addons/mail/wizard/mail_compose_message.py", line 126, in <lambda>
    subtype_id = fields.Many2one(default=lambda self: self.sudo().env.ref('mail.mt_comment', raise_if_not_found=False).id)
AttributeError: 'NoneType' object has no attribute 'id'

        what  the issue it is ?


Thanks for any advice.

Avatar
Discard
Best Answer

self.sudo().env.ref(mail.mt_comment... ) its trying to get a register and odoo cant found it.

Do you delete something from mail module or you have the last version

That register is created core/addons/mail/data/mail_data.xml so it should find it if no one has deleted the record.

Avatar
Discard