-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
[MIG] connector_importer_source_sftp: Migration to 16.0 #138
base: 16.0
Are you sure you want to change the base?
[MIG] connector_importer_source_sftp: Migration to 16.0 #138
Conversation
4914e5c
to
d8a7499
Compare
@@ -1 +1,2 @@ | |||
odoo-test-helper | |||
mock |
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.
this is not needed. Just change the import of mock to from unittest import mock
😉
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.
It IS needed because this depends on storage_backend_sftp
, which also requires mock
.
See https://github.com/OCA/connector-interfaces/actions/runs/10612682197/job/29414865086#step:8:209
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.
it is NOT because that's broken there too. It has been migrated in the wrong way. There's no need for such dep. Trust me 😉
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.
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.
There you go OCA/storage#388
A file can be moved only if we have a destination path.
Instead of throwing an exception with an unclear message in the _get_line function
d8a7499
to
b72af96
Compare
FTR I couldn't replicate the failing test on the event listener locally
Looks weird because the selection option should be already there. |
Ok. it fails only if you run tests at db creation. |
They must run at post_install to make sure the new source type is registered. Fixes: ``` odoo.tests.suite: ERROR: setUpClass (odoo.addons.connector_importer_source_sftp.tests.test_event_listener.TestRecordImporterFinishedEvent) Traceback (most recent call last): File "/__w/connector-interfaces/connector-interfaces/connector_importer_source_sftp/tests/test_event_listener.py", line 25, in setUpClass cls.recordset.write( File "/opt/odoo-venv/lib/python3.10/site-packages/odoo/addons/component_event/models/base.py", line 109, in write result = super(Base, self).write(vals) File "/opt/odoo/odoo/models.py", line 3784, in write field.write(self, value) File "/opt/odoo/odoo/fields.py", line 1125, in write cache_value = self.convert_to_cache(value, records) File "/opt/odoo/odoo/fields.py", line 2735, in convert_to_cache raise ValueError("Wrong value for %s: %r" % (self, value)) ValueError: Wrong value for import.recordset.source_model: 'import.source.csv.sftp' ```
Great, this change 876c609 fixed tests locally but not here 😓 |
I added a PR to update the dependency: p-tombez#1 |
IMP connector_importer_product update cryptography dep
ref: BSALLO-1566