Solution :
1- Prevent the change of model if fields are defined.
2- Display a label that alert of possible error (display the message in label it self ?)
error
` result = method(recs, *args, **kwargs)
File "/odoo/src/odoo/models.py", line 3022, in read
return self._read_format(fnames=fields, load=load)
File "/odoo/src/odoo/models.py", line 3042, in _read_format
vals[name] = convert(record[name], record, use_name_get)
File "/odoo/src/odoo/models.py", line 5689, in getitem
return self._fields[key].get(self, type(self))
File "/odoo/src/odoo/fields.py", line 1028, in get
raise ValueError("Compute method failed to assign %s.%s" % (record, self.name))
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/odoo/src/odoo/http.py", line 639, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/src/odoo/http.py", line 315, in _handle_exception
raise exception.with_traceback(None) from new_cause
ValueError: Compute method failed to assign ir.exports.line(29,).label`
To produce de bug: Create an import export pattern for model 1 ex: contact. Add fields. save. Change model and save ==> impossible to open the form view for this record. error in this method. https://github.com/OCA/server-ux/blob/14.0/base_export_manager/models/ir_exports_line.py#L97
Solution : 1- Prevent the change of model if fields are defined. 2- Display a label that alert of possible error (display the message in label it self ?)
error ` result = method(recs, *args, **kwargs) File "/odoo/src/odoo/models.py", line 3022, in read return self._read_format(fnames=fields, load=load) File "/odoo/src/odoo/models.py", line 3042, in _read_format vals[name] = convert(record[name], record, use_name_get) File "/odoo/src/odoo/models.py", line 5689, in getitem return self._fields[key].get(self, type(self)) File "/odoo/src/odoo/fields.py", line 1028, in get raise ValueError("Compute method failed to assign %s.%s" % (record, self.name)) Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/odoo/src/odoo/http.py", line 639, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/odoo/src/odoo/http.py", line 315, in _handle_exception raise exception.with_traceback(None) from new_cause ValueError: Compute method failed to assign ir.exports.line(29,).label`