I have created Sale Order with some line items.
- Create many SO with at lest 3 lines with non-admin user (But manager level user)
- Next day, tried to delete first line of the SO with non-admin user
- Once press Save, it gives error.
User #7 deleted sale.order.line records with IDs: [367] ERROR db_name odoo.http: Exception during JSON request handling. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/fields.py", line 947, in __get__ value = record.env.cache.get(record, self) File "/usr/lib/python3/dist-packages/odoo/api.py", line 960, in get value = self._data[field][record.id][key] KeyError: (<odoo.sql_db.Cursor object at 0x7f44b8cc20b8>, 7) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/http.py", line 646, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/usr/lib/python3/dist-packages/odoo/http.py", line 307, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise raise value File "/usr/lib/python3/dist-packages/odoo/http.py", line 683, in dispatch result = self._call_function(**self.params) File "/usr/lib/python3/dist-packages/odoo/http.py", line 339, in _call_function return checked_call(self.db, *args, **kwargs) File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper return f(dbname, *args, **kwargs) File "/usr/lib/python3/dist-packages/odoo/http.py", line 332, in checked_call result = self.endpoint(*a, **kw) File "/usr/lib/python3/dist-packages/odoo/http.py", line 927, in __call__ return self.method(*args, **kw) File "/usr/lib/python3/dist-packages/odoo/http.py", line 512, in response_wrap response = f(*args, **kw) File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 930, in call_kw return self._call_kw(model, method, args, kwargs) File "/usr/lib/python3/dist-ackages/odoo/addons/web/controllers/main.py" line 922, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/usr/lib/python3/dist-packages/odoo/api.py", line 689, in call_kw return call_kw_multi(method, model, args, kwargs) File "/usr/lib/python3/dist-packages/odoo/api.py", line 680, in call_kw_multi result = method(recs, *args, **kwargs) File "/usr/lib/python3/dist-packages/odoo/addons/sale/sale.py", line 1285, in write result = super(SaleOrder, self).write(vals) File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 277, in write result = super(MailThread, self).write(values) File "/usr/lib/python3/dist-packages/odoo/models.py", line 3008, in write self._write(old_vals) File "/usr/lib/python3/dist-packages/odoo/models.py", line 3223, in _write self.recompute() File "/usr/lib/python3/dist-packages/odoo/models.py", line 4801, in recompute vals = {n: rec[n] for n in ns} File "/usr/lib/python3/dist-packages/odoo/models.py", line 4801, in <dictcomp> vals = {n: rec[n] for n in ns} File "/usr/lib/python3/dist-packages/odoo/models.py", line 4659, in __getitem__ return self._fields[key].__get__(self, type(self)) File "/usr/lib/python3/dist-packages/odoo/fields.py", line 954, in __get__ value = record.env.cache.get(record, self) File "/usr/lib/python3/dist-packages/odoo/api.py", line 960, in get value = self._data[field][record.id][key] KeyError: (<odoo.sql_db.Cursor object at 0x7f44b8cc20b8>, 7)
Please suggest the solution as the other non admin user should be able to edit the order line items. They can not ask all the time the Administrator to do so.