Hello, I usually manage to get by, just using the search but I'm a bit stumped this time. I would appreciate some pointers in to the right direction.
Recently, I've been made aware of crashing/errors occurring during the following:
1. Updating the country field in Contacts, when the contact had no prior entry in the country field.
It crashes on save and produces the following stack trace.
Trace:
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/http.py", line 1971, in _serve_db return service_model.retrying(self._serve_ir_http, self.env) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 154, in retrying env.cr.flush() # submit the changes to the database ^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 138, in flush self.precommit.run() File "/usr/lib/python3/dist-packages/odoo/tools/misc.py", line 1227, in run func() File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 530, in _track_finalize tracking = records.with_context(context)._message_track(fnames, initial_values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 612, in _message_track tracking[record.id] = record._mail_track(tracked_fields, initial_values_dict[record.id]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/models.py", line 154, in _mail_track [0, 0, self.env['mail.tracking.value']._create_tracking_values( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_tracking_value.py", line 93, in _create_tracking_values 'new_value_char': new_value and dict(col_info['selection'])[new_value] or '' ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ KeyError: '0218' The above server error caused the following client error: RPC_ERROR: Odoo Server Error
2. When changing the stage of a CRM lead.
Stack trace:
RPC_ERROR Odoo Server Error Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/http.py", line 1971, in _serve_db return service_model.retrying(self._serve_ir_http, self.env) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 154, in retrying env.cr.flush() # submit the changes to the database ^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 138, in flush self.precommit.run() File "/usr/lib/python3/dist-packages/odoo/tools/misc.py", line 1227, in run func() File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 530, in _track_finalize tracking = records.with_context(context)._message_track(fnames, initial_values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 636, in _message_track record.message_post( File "/usr/lib/python3/dist-packages/odoo/addons/sms/models/mail_thread.py", line 52, in message_post return super().message_post(*args, body=body, message_type=message_type, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/odoo/addons/rating/models/mail_thread.py", line 178, in message_post message = super(MailThread, self).message_post(**kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 2223, in message_post new_message = self._message_create([msg_values]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/odoo/addons/rating/models/mail_thread.py", line 34, in _message_create return super()._message_create(values_list) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 2912, in _message_create ).create(create_values_list) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<decorator-gen-61>", line 2, in create File "/usr/lib/python3/dist-packages/odoo/api.py", line 431, in _model_create_multi return create(self, arg) ^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_message.py", line 687, in create vals_lst = [dict(cmd[2], mail_message_id=message.id) for cmd in tracking_values_cmd if len(cmd) == 3 and cmd[0] == 0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_message.py", line 687, in <listcomp> vals_lst = [dict(cmd[2], mail_message_id=message.id) for cmd in tracking_values_cmd if len(cmd) == 3 and cmd[0] == 0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: 'NoneType' object is not iterable The above server error caused the following client error: RPC_ERROR: Odoo Server Error
3. (Speculation) I suspect that there is some common root cause and there might be other occasions, where it might result in crashing.
It seems that the common theme is "tracking values", but I'm not sure where I should be looking in to next.
Thanks for reading, any help would be greatly appreciated.