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

[16.0][FIX] account_cash_deposit: Post-install test + fallback to load CoA #2046

Merged
merged 2 commits into from
Mar 10, 2025

Conversation

victoralmau
Copy link
Member

Since odoo/odoo@d0342c8, the default existing company is not getting a CoA automatically, provoking than the current tests fail with the error:

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

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.

@Tecnativa

@victoralmau
Copy link
Member Author

Ping @pedrobaeza

@pedrobaeza pedrobaeza added this to the 16.0 milestone Mar 10, 2025
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 patch

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-2046-by-pedrobaeza-bump-patch, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Mar 10, 2025
Signed-off-by pedrobaeza
@OCA-git-bot
Copy link
Contributor

@pedrobaeza The merge process could not be finalized, because command twine check odoo_addon_account_cash_deposit-16.0.1.2.1-py3-none-any.whl failed with output:

Checking odoo_addon_account_cash_deposit-16.0.1.2.1-py3-none-any.whl: �[31mFAILED�[0m
�[31mERROR   �[0m `long_description` has syntax errors in markup and would not be        
         rendered on PyPI.                                                      
         line 43: Warning: Cannot scale image!                                  
           Could not get size from                                              
         "https://raw.githubusercontent.com/OCA/account-financial-tools/16.0/acc
         ount_cash_deposit/static/description/currency_form_view.png":          
           Requires Python Imaging Library.                                     
           Reading external files disabled.                                     
�[33mWARNING �[0m `long_description_content_type` missing. defaulting to `text/x-rst`.   

@pedrobaeza
Copy link
Member

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-2046-by-pedrobaeza-bump-patch, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Mar 10, 2025
Signed-off-by pedrobaeza
@OCA-git-bot
Copy link
Contributor

@pedrobaeza The merge process could not be finalized, because command twine check odoo_addon_account_cash_deposit-16.0.1.2.1-py3-none-any.whl failed with output:

Checking odoo_addon_account_cash_deposit-16.0.1.2.1-py3-none-any.whl: �[31mFAILED�[0m
�[31mERROR   �[0m `long_description` has syntax errors in markup and would not be        
         rendered on PyPI.                                                      
         line 43: Warning: Cannot scale image!                                  
           Could not get size from                                              
         "https://raw.githubusercontent.com/OCA/account-financial-tools/16.0/acc
         ount_cash_deposit/static/description/currency_form_view.png":          
           Requires Python Imaging Library.                                     
           Reading external files disabled.                                     
�[33mWARNING �[0m `long_description_content_type` missing. defaulting to `text/x-rst`.   

@pedrobaeza
Copy link
Member

@victoralmau it seems the README is not correct.

Since odoo/odoo@d0342c8, the default existing company is not getting a
CoA automatically, provoking than the current tests fail with the error:

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

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.
@victoralmau victoralmau force-pushed the 16.0-fix-account_cash_deposit-coa branch from 33c491f to 8b5953d Compare March 10, 2025 16:38
@pedrobaeza
Copy link
Member

Let's try again

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-2046-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 9ba8d1b into OCA:16.0 Mar 10, 2025
9 checks passed
@OCA-git-bot
Copy link
Contributor

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

@pedrobaeza pedrobaeza deleted the 16.0-fix-account_cash_deposit-coa branch March 10, 2025 17:15
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.

4 participants