Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in the compute method of export line label #109

Open
mourad-ehm opened this issue Jun 16, 2022 · 0 comments
Open

Bug in the compute method of export line label #109

mourad-ehm opened this issue Jun 16, 2022 · 0 comments

Comments

@mourad-ehm
Copy link

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`

@mourad-ehm mourad-ehm changed the title Bug compute of export line label Bug in the compute method of export line label Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant