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
[14.0][FIX] better error catching #60260
base: 14.0
Are you sure you want to change the base?
Conversation
note previous version are also impacted |
@rco-odoo any news? |
@rco-odoo up |
record=stream.index, | ||
field='.id', | ||
message=_(u"Invalid database identifier '%s'") % dbid)) | ||
|
||
if not self.search([('id', '=', dbid)]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rco-odoo what do you think about modifying the search here and adding a with_context(active_test=False) ?
Indeed if you want to import (using id) in order to active a archived product, the search will not find the id
@sebastienbeau knowing that 14 is no longer updated, is this PR still needed? |
Description of the issue/feature this PR addresses:
When having a custom module that reuse the load method (here is the project : https://github.com/shopinvader/pattern-import-export.
Current behavior before PR:
If you pass an invalid type of field for the id the error is not catched correctly and you have a pg traceback
Desired behavior after PR is merged:
If you pass an invalid type of field for the id the error is catched correctly.
@rco-odoo
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr