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



Traceback (most recent call last):
  File "G:\oDoo16.0.20221111\server\odoo\http.py", line 1549, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "G:\oDoo16.0.20221111\server\odoo\service\model.py", line 134, in retrying
    result = func()
  File "G:\oDoo16.0.20221111\server\odoo\http.py", line 1578, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "G:\oDoo16.0.20221111\server\odoo\http.py", line 1775, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "G:\oDoo16.0.20221111\server\odoo\addons\website\models\ir_http.py", line 227, in _dispatch
    response = super()._dispatch(endpoint)
  File "G:\oDoo16.0.20221111\server\odoo\addons\base\models\ir_http.py", line 140, in _dispatch
    result = endpoint(**request.params)
  File "G:\oDoo16.0.20221111\server\odoo\http.py", line 673, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "G:\oDoo16.0.20221111\server\odoo\addons\web\controllers\dataset.py", line 46, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "G:\oDoo16.0.20221111\server\odoo\addons\web\controllers\dataset.py", line 33, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "G:\oDoo16.0.20221111\server\odoo\api.py", line 461, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "G:\oDoo16.0.20221111\server\odoo\api.py", line 448, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "", line 2, in button_immediate_install
  File "G:\oDoo16.0.20221111\server\odoo\addons\base\models\ir_module.py", line 75, in check_and_log
    return method(self, *args, **kwargs)
  File "G:\oDoo16.0.20221111\server\odoo\addons\base\models\ir_module.py", line 487, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "G:\oDoo16.0.20221111\server\odoo\addons\base\models\ir_module.py", line 611, in _button_immediate_function
    registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "", line 2, in new
  File "G:\oDoo16.0.20221111\server\odoo\tools\func.py", line 87, in locked
    return func(inst, *args, **kwargs)
  File "G:\oDoo16.0.20221111\server\odoo\modules\registry.py", line 91, in new
    odoo.modules.load_modules(registry, force_demo, status, update_module)
  File "G:\oDoo16.0.20221111\server\odoo\modules\loading.py", line 484, in load_modules
    loaded_modules, update_module, models_to_check)
  File "G:\oDoo16.0.20221111\server\odoo\modules\loading.py", line 373, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "G:\oDoo16.0.20221111\server\odoo\modules\loading.py", line 207, in load_module_graph
    registry.init_models(cr, model_names, {'module': package.name}, new_install)
  File "G:\oDoo16.0.20221111\server\odoo\modules\registry.py", line 453, in init_models
    model._auto_init()
  File "G:\oDoo16.0.20221111\server\odoo\models.py", line 2561, in _auto_init
    raise_on_invalid_object_name(self._name)
  File "G:\oDoo16.0.20221111\server\odoo\models.py", line 105, in raise_on_invalid_object_name
    raise ValueError(msg)
ValueError: The _name attribute my.Student is not valid.

i got this error and I changed my.Student to my.student in model file but it seem doesn't solve the problem. Can anyone help me with this.

my.Student

 


Avatar
Discard
Best Answer

Hii Nguyen Phuong

Looking like case sensitive issues.
Just change the model name.
_name = "my.Student"
To
_name = "my.student"

And update that module -u with restarting server.

Avatar
Discard
Related Posts Replies Views Activity
1
Aug 23
1953
0
Jan 24
268
1
Apr 23
2444
1
Mar 23
946
0
Jun 22
4050