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

Syncing from upstream OCA/bank-payment (16.0) #1336

Merged
merged 3 commits into from
Feb 25, 2025
Merged

Conversation

bt-admin
Copy link

bt_gitbot

pedrobaeza and others added 3 commits February 24, 2025 20:27
Since odoo/odoo@d0342c8, the default existing company is not getting a
CoA automatically, provoking than the current tests fail with errors
like:

odoo.exceptions.RedirectWarning: ('Cannot find a chart of accounts for this company, You should configure it. \nPlease go to Account Configuration.', 246, 'Go to the configuration panel', None)

or

odoo.exceptions.UserError: No journal could be found in company My Company (San Francisco) for any of those types: sale

or

psycopg2.errors.CheckViolation: new row for relation "account_move_line" violates check constraint "account_move_line_check_accountable_required_fields"

All of them provoked by the lack of a CoA installed.

Thus, we put tests post-install for being sure localization modules are
installed, the same as AccountTestInvoicingCommon does, but we don't
inherit from it, as it creates an overhead creating 2 new companies
and loading their CoA, and some more stuff, while we don't need all of
that.

Besides, if you don't have `l10n_generic_coa` installed, you can't
use another CoA (like `l10n_es`) easily, so we put little code to select
the first available CoA.
Signed-off-by pedrobaeza
@bt-admin bt-admin added the 16.0 label Feb 25, 2025
@bt-admin bt-admin merged commit 23ff380 into brain-tec:16.0 Feb 25, 2025
4 checks passed
Copy link

codecov bot commented Feb 25, 2025

Codecov Report

Attention: Patch coverage is 35.89744% with 25 lines in your changes missing coverage. Please review.

Project coverage is 90.26%. Comparing base (d8133f2) to head (ff09057).
Report is 148 commits behind head on 16.0.

Files with missing lines Patch % Lines
...ount_banking_mandate/tests/test_invoice_mandate.py 28.57% 4 Missing and 1 partial ⚠️
account_banking_mandate/tests/test_mandate.py 28.57% 4 Missing and 1 partial ⚠️
...ment_partner/tests/test_account_payment_partner.py 50.00% 4 Missing and 1 partial ⚠️
...nt_purchase/tests/test_account_payment_purchase.py 28.57% 4 Missing and 1 partial ⚠️
account_payment_sale/tests/common.py 28.57% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             16.0    #1336      +/-   ##
==========================================
- Coverage   90.88%   90.26%   -0.62%     
==========================================
  Files         161      161              
  Lines        4233     4264      +31     
  Branches      400      410      +10     
==========================================
+ Hits         3847     3849       +2     
- Misses        265      288      +23     
- Partials      121      127       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants