= False ?
Ругается Оду при доступе к такой модели.
Стоит добавить в модель
write_date = fields.Datetime('Last Modified', readonly=True, index=True, copy=False, default=fields.Datetime.now)
Как ошибка изчезает.
Не сталкивались?
@yelizariev
RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1722, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 133, in retrying
result = func()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1749, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1953, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 722, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 24, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 468, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 453, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/models/models.py", line 86, in web_read
values_list: List[Dict] = self.read(fields_to_read, load=None)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3537, in read
self._origin.fetch(fields)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3792, in fetch
fields_to_fetch = self._determine_fields_to_fetch(field_names, ignore_when_in_cache=True)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3859, in _determine_fields_to_fetch
raise ValueError(f"Invalid field {field_name!r} on model {self._name!r}")
ValueError: Invalid field 'write_date' on model 'asterisk_plus.call'
The above server error caused the following client error:
OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)
OwlError@
handleError@https://loclahost:8069/web/assets/0144177/web.assets_web.min.js:916:113
@https://loclahost:8069/web/assets/0144177/web.assets_web.min.js:1006:30
Caused by: RPC_ERROR: Odoo Server Error
RPCError@https://loclahost:8069/web/assets/0144177/web.assets_web.min.js:2869:324
makeErrorFromResponse@https://loclahost:8069/web/assets/0144177/web.assets_web.min.js:2872:175
@https://loclahost:8069/web/assets/0144177/web.assets_web.min.js:2876:34
Можно взять и посмотреть что-там отменили)) https://github.com/OCA/maintainer-tools/wiki
Нет ничего там про _log_access. Поискал в исходниках, оно есть - https://github.com/search?q=repo%3Aodoo%2Fodoo%20_log_access&type=code Но похоже поле write_date в 17.0 обязательно для form view. Такие дела.
Обсуждают сегодня