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_invoice_report_due_list: Define the right rate for the currency in test #356

Draft
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

victoralmau
Copy link
Member

Define the right rate for the currency in test

In some cases (when installing some modules), the rate of the currency is different than expected, therefore, we remove the existing values and define the expected rate to validate the appropriate values.

@Tecnativa

@victoralmau victoralmau marked this pull request as ready for review February 26, 2025 08:29
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.

Don't remove the extra argument that may be used by dependent modules.

@victoralmau victoralmau force-pushed the 16.0-fix-account_invoice_report_due_list-tests branch from da2a6cc to 491ebb1 Compare February 26, 2025 11:00
@pedrobaeza pedrobaeza added this to the 16.0 milestone Feb 26, 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.

Anyway, this seems more something that the currency is not the same than the company currency. Have you explored to make sure the currency is the company's one in the invoices or whatever?

@victoralmau victoralmau force-pushed the 16.0-fix-account_invoice_report_due_list-tests branch from 491ebb1 to a5c67d9 Compare February 26, 2025 11:14
@victoralmau
Copy link
Member Author

Anyway, this seems more something that the currency is not the same than the company currency. Have you explored to make sure the currency is the company's one in the invoices or whatever?

The problem is not the company's currency (in this test we want to validate the value that is shown when an invoice is made in a currency different from the company's), it is the value of the same that has changed, for that reason all the rates are removed and the appropriate value is set.

@pedrobaeza
Copy link
Member

Yeah, sorry, I saw it from mobile and didn't get full thing. Then for the test to serve for something, a different rate than 1 should be used and then get the amount converted to that rate to check that the code doing the conversion is working. If not, you don't know if the test is correct because is doing the conversion with rate 1, or no conversion is being done at all.

…currency in test

In some cases (when installing some modules), the rate of the currency is different
than expected, therefore, we remove the existing values and define the expected rate
to validate the appropriate values.
@victoralmau victoralmau force-pushed the 16.0-fix-account_invoice_report_due_list-tests branch from a5c67d9 to 67b08e5 Compare February 26, 2025 12:08
def test_due_list_currency_extra(self, move_type="out_invoice"):
# We leave the rate of the extra currency at 1 so that the amounts to be
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# We leave the rate of the extra currency at 1 so that the amounts to be
# We leave the rate of the extra currency at 2 so that the amounts to be

@victoralmau
Copy link
Member Author

Reviewing in detail, it is not necessary to set a value (2 for example) for the opposite currency of the company because the value returned will be in the currency of the company; i.e. 50+150.

I leave the PR in draft and I will continue investigating to apply the appropriate fix when I have more clear the reason and the solution, sorry.

@victoralmau victoralmau marked this pull request as draft February 26, 2025 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants