I am beginner, trying to follow Daniel Reis's book Odoo 10 Development.
I found error upgrading the module. This is
This is todo_model.py:
The security ir.model.access.csv
And todo_access_rules.xml
Init .py and manifest .py seem like ok.
Views for tree, form, search seem like ok.
But when the apps upgraded, it throws error:
Odoo Server Error
Traceback (most recent call last): File "/opt/odoo/odoo-10.0/odoo/http.py", line 642, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/odoo/odoo-10.0/odoo/http.py", line 684, in dispatch result = self._call_function(**self.params) File "/opt/odoo/odoo-10.0/odoo/http.py", line 334, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/odoo/odoo-10.0/odoo/service/model.py", line 101, in wrapper return f(dbname, *args, **kwargs) File "/opt/odoo/odoo-10.0/odoo/http.py", line 327, in checked_call result = self.endpoint(*a, **kw) File "/opt/odoo/odoo-10.0/odoo/http.py", line 942, in __call__ return self.method(*args, **kw) File "/opt/odoo/odoo-10.0/odoo/http.py", line 507, in response_wrap response = f(*args, **kw) File "/opt/odoo/odoo-10.0/addons/web/controllers/main.py", line 896, in call_button action = self._call_kw(model, method, args, {}) File "/opt/odoo/odoo-10.0/addons/web/controllers/main.py", line 884, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/opt/odoo/odoo-10.0/odoo/api.py", line 689, in call_kw return call_kw_multi(method, model, args, kwargs) File "/opt/odoo/odoo-10.0/odoo/api.py", line 680, in call_kw_multi result = method(recs, *args, **kwargs) File "/opt/odoo/odoo-10.0/odoo/addons/base/module/module.py", line 528, in button_immediate_upgrade return self._button_immediate_function(type(self).button_upgrade) File "/opt/odoo/odoo-10.0/odoo/addons/base/module/module.py", line 485, in _button_immediate_function modules.registry.Registry.new(self._cr.dbname, update_module=True) File "/opt/odoo/odoo-10.0/odoo/modules/registry.py", line 83, in new odoo.modules.load_modules(registry._db, force_demo, status, update_module) File "/opt/odoo/odoo-10.0/odoo/modules/loading.py", line 373, in load_modules force, status, report, loaded_modules, update_module, models_to_check) File "/opt/odoo/odoo-10.0/odoo/modules/loading.py", line 270, in load_marked_modules perform_checks=perform_checks, models_to_check=models_to_check File "/opt/odoo/odoo-10.0/odoo/modules/loading.py", line 182, in load_module_graph _load_data(cr, module_name, idref, mode, kind='data') File "/opt/odoo/odoo-10.0/odoo/modules/loading.py", line 96, in _load_data tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report) File "/opt/odoo/odoo-10.0/odoo/tools/convert.py", line 839, in convert_file convert_csv_import(cr, module, pathname, fp.read(), idref, mode, noupdate) File "/opt/odoo/odoo-10.0/odoo/tools/convert.py", line 891, in convert_csv_import result = env[model].load(fields, datas) File "/opt/odoo/odoo-10.0/odoo/models.py", line 874, in load for id, xid, record, info in converted: File "/opt/odoo/odoo-10.0/odoo/models.py", line 1019, in _convert_records for record, extras in stream: File "/opt/odoo/odoo-10.0/odoo/tools/misc.py", line 976, in next val = next(self.stream, _ph) File "/opt/odoo/odoo-10.0/odoo/models.py", line 943, in _extract_records if fields[fnames[0]].type == 'one2many' KeyError: 'perm_unlink '
What is going on? I check models.py but I wonder what is what is KeyError, what is the relation with one2many? Please help.
Widi
did you update odoo code files and forget to run upgrade commands ?? seems like something is missing there..