-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
base: 16.0
Are you sure you want to change the base?
[16.0][FIX] account_invoice_report_due_list: Define the right rate for the currency in test #356
Conversation
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.
Don't remove the extra argument that may be used by dependent modules.
da2a6cc
to
491ebb1
Compare
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.
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?
account_invoice_report_due_list/tests/test_invoice_report_due_list.py
Outdated
Show resolved
Hide resolved
491ebb1
to
a5c67d9
Compare
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. |
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.
a5c67d9
to
67b08e5
Compare
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 |
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.
# 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 |
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. |
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