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

[17.0][MIG] account_statement_import_online: Migration to 17.0 #706

Merged

Conversation

carolinafernandez-tecnativa
Copy link
Contributor

@carolinafernandez-tecnativa carolinafernandez-tecnativa commented Jul 8, 2024

  • Standard migration to v17.
  • Add test-requirements.txt odoo_test_helper to avoid getting error in test that odoo_test_helper not found

@Tecnativa
TT49855
@pedrobaeza @pilarvargas-tecnativa

NL66278 and others added 28 commits July 8, 2024 13:37
Also Rename account_bank_statement_import_online => account_statement_import_online
…f online.bank.statement.provider: avoid speading the information on 3 tabs. As there are just a few fields, let's keep all the information directly visible.

Fix warning on search view of online.bank.statement.provider
Fix some tests
Button on journal form view to access the wizard
The wizard now returns the bank statements of the journal(s)
Fix wired strings
Currently translated at 26.6% (24 of 90 strings)

Translation: bank-statement-import-14.0/bank-statement-import-14.0-account_statement_import_online
Translate-URL: https://translation.odoo-community.org/projects/bank-statement-import-14-0/bank-statement-import-14-0-account_statement_import_online/it/
1. Find partner if ther already is a bank account with the right IBAN;
2. Store (and display) raw import data to help in problem determination;
3. Make it easy to extend the parsing of import data;
4. Apply some clean coding principles.
…port tests at install

Installing this module failed because `mock` couldn't be found. Indeed there was a migration problem.

However, I was not testing the module; just installing. At install, tests shouldn't be imported.

This file was being imported because the dummy model was expected to exist in database for tests. Using odoo-test-helper for that now.

@moduon MT-295
The 2 modules account_statement_import_online and
account_statement_import depend on account_statement_import_base (and
not on each other) and share common code, in particular a hook to update
the statement line. So we can now have reconciliation modules that use
this hook and therefore work both on file import and online import. More
details on OCA#481.

Improve bank statement line form view and journal form view.
Currently translated at 25.5% (24 of 94 strings)

Translation: bank-statement-import-15.0/bank-statement-import-15.0-account_statement_import_online
Translate-URL: https://translation.odoo-community.org/projects/bank-statement-import-15-0/bank-statement-import-15-0-account_statement_import_online/it/
You may have an old value on online_bank_statement_provider, but
switched to another source, and thus, the button is still visible,
which is not correct.

Let's use the source selection as the invisible modifier.
****po-python-parse-format****
account_statement_import_online/i18n/es.po:136 Translation string couldn't be parsed correctly using str.format KeyError('excepction') - [po-python-parse-format]
It's useful to debug RAW data received from your online sources. With
this improvement, you can do it easily from the manual pull wizard. It's
only available for users in debug mode (or with technical features).

TT47238
Currently translated at 100.0% (96 of 96 strings)

Translation: bank-statement-import-16.0/bank-statement-import-16.0-account_statement_import_online
Translate-URL: https://translation.odoo-community.org/projects/bank-statement-import-16-0/bank-statement-import-16-0-account_statement_import_online/es/
…e service is set

This prevents a flood of logs in case your journals are written very often.
Currently translated at 14.5% (14 of 96 strings)

Translation: bank-statement-import-16.0/bank-statement-import-16.0-account_statement_import_online
Translate-URL: https://translation.odoo-community.org/projects/bank-statement-import-16-0/bank-statement-import-16-0-account_statement_import_online/tr/
@carolinafernandez-tecnativa carolinafernandez-tecnativa force-pushed the 17.0-mig-account_statement_import_online branch from 96c22d0 to d3cc92d Compare July 8, 2024 15:09
@carolinafernandez-tecnativa
Copy link
Contributor Author

ping @pedrobaeza @pilarvargas-tecnativa

@pilarvargas-tecnativa
Copy link

pilarvargas-tecnativa commented Jul 25, 2024

When I try to create a provider I get the following error:

Traceback (most recent call last):
  File "/opt/odoo/odoo/http.py", line 1764, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/opt/odoo/odoo/service/model.py", line 133, in retrying
    result = func()
  File "/opt/odoo/odoo/http.py", line 1791, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/opt/odoo/odoo/http.py", line 1995, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
    result = endpoint(**request.params)
  File "/opt/odoo/odoo/http.py", line 741, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/opt/odoo/addons/web/controllers/dataset.py", line 24, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 468, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 453, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/addons/web/models/models.py", line 1080, in onchange
    snapshot1 = RecordSnapshot(record, fields_spec)
  File "/opt/odoo/addons/web/models/models.py", line 1167, in __init__
    self.fetch(name)
  File "/opt/odoo/addons/web/models/models.py", line 1182, in fetch
    self[field_name] = self.record[field_name]
  File "/opt/odoo/odoo/models.py", line 6636, in __getitem__
    return self._fields[key].__get__(self, self.env.registry[self._name])
  File "/opt/odoo/odoo/fields.py", line 1207, in __get__
    self.compute_value(recs)
  File "/opt/odoo/odoo/fields.py", line 1389, in compute_value
    records._compute_field_value(self)
  File "/opt/odoo/addons/mail/models/mail_thread.py", line 424, in _compute_field_value
    return super()._compute_field_value(field)
  File "/opt/odoo/odoo/models.py", line 4880, in _compute_field_value
    fields.determine(field.compute, self)
  File "/opt/odoo/odoo/fields.py", line 102, in determine
    return needle(*args)
  File "/opt/odoo/odoo/models.py", line 1663, in _compute_display_name
    record.display_name = convert(record[self._rec_name], record)
  File "/opt/odoo/odoo/models.py", line 6636, in __getitem__
    return self._fields[key].__get__(self, self.env.registry[self._name])
  File "/opt/odoo/odoo/fields.py", line 1152, in __get__
    self.recompute(record)
  File "/opt/odoo/odoo/fields.py", line 1367, in recompute
    apply_except_missing(self.compute_value, recs)
  File "/opt/odoo/odoo/fields.py", line 1340, in apply_except_missing
    func(records)
  File "/opt/odoo/odoo/fields.py", line 1389, in compute_value
    records._compute_field_value(self)
  File "/opt/odoo/addons/mail/models/mail_thread.py", line 424, in _compute_field_value
    return super()._compute_field_value(field)
  File "/opt/odoo/odoo/models.py", line 4880, in _compute_field_value
    fields.determine(field.compute, self)
  File "/opt/odoo/odoo/fields.py", line 102, in determine
    return needle(*args)
  File "/mnt/data/odoo-addons-dir/account_statement_import_online/models/online_bank_statement_provider.py", line 167, in _compute_name
    provider.name = " ".join([provider.journal_id.name, provider.service])
TypeError: sequence item 0: expected str instance, bool found

The above server error caused the following client error:
OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)
    Error: An error occured in the owl lifecycle (see this Error's "cause" property)
        at handleError (http://oca-bank-statement-import-17-0-pr706-d3cc92dd674f.runboat.odoo-community.org/web/assets/b8308fe/web.assets_web.min.js:916:101)
        at App.handleError (http://oca-bank-statement-import-17-0-pr706-d3cc92dd674f.runboat.odoo-community.org/web/assets/b8308fe/web.assets_web.min.js:1543:29)
        at ComponentNode.initiateRender (http://oca-bank-statement-import-17-0-pr706-d3cc92dd674f.runboat.odoo-community.org/web/assets/b8308fe/web.assets_web.min.js:1006:19)

Caused by: RPC_ERROR: Odoo Server Error
    RPC_ERROR
        at makeErrorFromResponse (http://oca-bank-statement-import-17-0-pr706-d3cc92dd674f.runboat.odoo-community.org/web/assets/b8308fe/web.assets_web.min.js:2884:163)
        at XMLHttpRequest.<anonymous> (http://oca-bank-statement-import-17-0-pr706-d3cc92dd674f.runboat.odoo-community.org/web/assets/b8308fe/web.assets_web.min.js:2888:13)

@carolinafernandez-tecnativa carolinafernandez-tecnativa force-pushed the 17.0-mig-account_statement_import_online branch from d3cc92d to ddffa46 Compare July 29, 2024 09:13
@carolinafernandez-tecnativa
Copy link
Contributor Author

When I try to create a provider I get the following error:

Traceback (most recent call last):
  File "/opt/odoo/odoo/http.py", line 1764, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/opt/odoo/odoo/service/model.py", line 133, in retrying
    result = func()
  File "/opt/odoo/odoo/http.py", line 1791, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/opt/odoo/odoo/http.py", line 1995, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
    result = endpoint(**request.params)
  File "/opt/odoo/odoo/http.py", line 741, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/opt/odoo/addons/web/controllers/dataset.py", line 24, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 468, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 453, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/addons/web/models/models.py", line 1080, in onchange
    snapshot1 = RecordSnapshot(record, fields_spec)
  File "/opt/odoo/addons/web/models/models.py", line 1167, in __init__
    self.fetch(name)
  File "/opt/odoo/addons/web/models/models.py", line 1182, in fetch
    self[field_name] = self.record[field_name]
  File "/opt/odoo/odoo/models.py", line 6636, in __getitem__
    return self._fields[key].__get__(self, self.env.registry[self._name])
  File "/opt/odoo/odoo/fields.py", line 1207, in __get__
    self.compute_value(recs)
  File "/opt/odoo/odoo/fields.py", line 1389, in compute_value
    records._compute_field_value(self)
  File "/opt/odoo/addons/mail/models/mail_thread.py", line 424, in _compute_field_value
    return super()._compute_field_value(field)
  File "/opt/odoo/odoo/models.py", line 4880, in _compute_field_value
    fields.determine(field.compute, self)
  File "/opt/odoo/odoo/fields.py", line 102, in determine
    return needle(*args)
  File "/opt/odoo/odoo/models.py", line 1663, in _compute_display_name
    record.display_name = convert(record[self._rec_name], record)
  File "/opt/odoo/odoo/models.py", line 6636, in __getitem__
    return self._fields[key].__get__(self, self.env.registry[self._name])
  File "/opt/odoo/odoo/fields.py", line 1152, in __get__
    self.recompute(record)
  File "/opt/odoo/odoo/fields.py", line 1367, in recompute
    apply_except_missing(self.compute_value, recs)
  File "/opt/odoo/odoo/fields.py", line 1340, in apply_except_missing
    func(records)
  File "/opt/odoo/odoo/fields.py", line 1389, in compute_value
    records._compute_field_value(self)
  File "/opt/odoo/addons/mail/models/mail_thread.py", line 424, in _compute_field_value
    return super()._compute_field_value(field)
  File "/opt/odoo/odoo/models.py", line 4880, in _compute_field_value
    fields.determine(field.compute, self)
  File "/opt/odoo/odoo/fields.py", line 102, in determine
    return needle(*args)
  File "/mnt/data/odoo-addons-dir/account_statement_import_online/models/online_bank_statement_provider.py", line 167, in _compute_name
    provider.name = " ".join([provider.journal_id.name, provider.service])
TypeError: sequence item 0: expected str instance, bool found

The above server error caused the following client error:
OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)
    Error: An error occured in the owl lifecycle (see this Error's "cause" property)
        at handleError (http://oca-bank-statement-import-17-0-pr706-d3cc92dd674f.runboat.odoo-community.org/web/assets/b8308fe/web.assets_web.min.js:916:101)
        at App.handleError (http://oca-bank-statement-import-17-0-pr706-d3cc92dd674f.runboat.odoo-community.org/web/assets/b8308fe/web.assets_web.min.js:1543:29)
        at ComponentNode.initiateRender (http://oca-bank-statement-import-17-0-pr706-d3cc92dd674f.runboat.odoo-community.org/web/assets/b8308fe/web.assets_web.min.js:1006:19)

Caused by: RPC_ERROR: Odoo Server Error
    RPC_ERROR
        at makeErrorFromResponse (http://oca-bank-statement-import-17-0-pr706-d3cc92dd674f.runboat.odoo-community.org/web/assets/b8308fe/web.assets_web.min.js:2884:163)
        at XMLHttpRequest.<anonymous> (http://oca-bank-statement-import-17-0-pr706-d3cc92dd674f.runboat.odoo-community.org/web/assets/b8308fe/web.assets_web.min.js:2888:13)

Fixed it, could you please try again? :)

@carolinafernandez-tecnativa
Copy link
Contributor Author

ping @pedrobaeza

@pedrobaeza
Copy link
Member

/ocabot migration account_statement_import_online

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone Jul 29, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Jul 29, 2024
10 tasks
@pedrobaeza
Copy link
Member

On both v16 and v17, once you select one online provider (there's no provider in this PR, but you can check on v16), there's no way to configure the parameters of this provider. Can you please check it and fix it in both versions, starting with v16?

@carolinafernandez-tecnativa
Copy link
Contributor Author

carolinafernandez-tecnativa commented Jul 30, 2024

On both v16 and v17, once you select one online provider (there's no provider in this PR, but you can check on v16), there's no way to configure the parameters of this provider. Can you please check it and fix it in both versions, starting with v16?

Fixed added in v16 #710

Once approved, i will forward it.

@carolinafernandez-tecnativa
Copy link
Contributor Author

On both v16 and v17, once you select one online provider (there's no provider in this PR, but you can check on v16), there's no way to configure the parameters of this provider. Can you please check it and fix it in both versions, starting with v16?

Fixed added in v16 #710

Once approved, i will forward it.

Fw #710 done @pedrobaeza

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 17.0-ocabot-merge-pr-706-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 314fb2d into OCA:17.0 Jul 31, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at e732478. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 17.0-mig-account_statement_import_online branch July 31, 2024 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.