-
Notifications
You must be signed in to change notification settings - Fork 289
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
[MIG] internal_transfer_with_agreed_amount: Migration to 17.0 t#71297 #1670
Merged
luisg123v
merged 18 commits into
Vauxoo:17.0
from
vauxoo-dev:17.0-mig-internal_transfer_with_agreed_amount
Jun 18, 2024
Merged
[MIG] internal_transfer_with_agreed_amount: Migration to 17.0 t#71297 #1670
luisg123v
merged 18 commits into
Vauxoo:17.0
from
vauxoo-dev:17.0-mig-internal_transfer_with_agreed_amount
Jun 18, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- When foreign currencies are bought, in some cases an amount is agreed for the transaction and it is not exactly that resulting from the official exchange rate. - When payments are made or received in foreign currency and the customer or payment service uses its own exchange rate. For these cases this module allows an internal transfer between different currencies, setting an agreed amount. This agreed amount will be used to set the amount currency in the journal entries. A new module is created to avoid duplication of code in different clients that require this process.
…e&MX The module depended on the enterprise's modules `account_accountant` and `l10n_mx_edi`, which are not necessary. In addition, tests were re-written to: - Use currency EUR instead of MXN - Use the Form class for the wizard
This removes: - Hencoding headers, fixing lint `utf8-coding-comment` - Headers like `# Part of Odoo` - And other ones
Changelog: - Apply the automatic changes from pre-commit-vauxoo
Changelog: - Add or modify the header of xml files having the encoding as UTF-8
… their models Following guidelines Changelog: - Every xml file must have have one model, the name of that model and the kind of the data, e.g. _data or _demo.
…and performance purposes Changelog: - Modify data putting IDs or names in the first position and then their values - Make improvements in the code for performance or readability purposes
Changelog: - Modify setUp to setUpClass improving performance for tests
…nherited records Following guidelines, the inherited record must have the same external ID as same as the original record.
After refactoring of code to update terms or assigning to the new external IDs and move the translation file to i18n folder.
… to v16.0 - Update module version - Update button name in the account payment views - Remove update_posted field from account journal references in test - Update act_window to field - Refactor to the wizard to apply the functionality when there are two currencies in the internal transfer Co-authored-by: Rolando Duarte <[email protected]>
…method Modify in a single method the values that will be written in the account move lines so that the method can be inherited in case it is necessary to modify more values in the lines. In addition, two methods are added to pre and post process payments, to be used if modifications are required in an inheritance. Finally, obtaining currencies related to the internal transfer have been moved to a separate method to facilitate the inheritance of the method that validates the number of currencies. Changelog: - Set debit and credit values to write in _prepare_values_from_lines method when the exchange currency is the same as the company currency. - Add methods to be inherited when payments also needs modifications. - Get the currencies in a new method named _get_currencies.
…ny currency Change journal and currency in USD to use the company currency in order to be able to run the tests when the company currency is different from USD. Chagelog: - Change USD to the company currency. - Remove USD from variables and replace them with local in some cases. - Allow reconciliation to the company transfer account. - Remove unused parameter from create_multicurrency_transfer method.
…internal_transfer_with_agreed_amount test The test was failing due to an attempt to write to the invisible field 'destination_journal_id'. This occurred because the 'destination_journal_id' field was set to be invisible when the 'is_internal_transfer' field is not True. Consequently, when the 'journal_id' field changed in the form, the 'is_internal_transfer' value changed to False, triggering the error. This commit resolves the issue and prevents the AssertionError.
…ce path This update corrects the path to the images in the README, ensuring they are displayed properly.
CLaurelB
force-pushed
the
17.0-mig-internal_transfer_with_agreed_amount
branch
3 times, most recently
from
June 13, 2024 22:27
b654fd2
to
5387ace
Compare
@randall-vx @luisg123v could you review, please? |
CLaurelB
changed the title
[MIG] internal_transfer_with_agreed_amount: Migration to 17.0
[MIG] internal_transfer_with_agreed_amount: Migration to 17.0 t#71297
Jun 14, 2024
luisg123v
requested changes
Jun 17, 2024
internal_transfer_with_agreed_amount/views/account_payment_views.xml
Outdated
Show resolved
Hide resolved
internal_transfer_with_agreed_amount/tests/test_internal_transfer_with_agreed_amount.py
Show resolved
Hide resolved
Fix ambiguous variable name.
Changelog: - Replace `attrs` with an expression for the `invisible` attribute in the view. - Add payment amount and currency update after the move is set to draft. This is because the undoing of the reconciliation triggers an update on the payment, and the amount gets updated to the previous agreed amount along with its corresponding currency. This happens when the agreed amount is edited. - Enable the euro currency in the test since it's required for multicurrency transfers. - Update translations file.
CLaurelB
force-pushed
the
17.0-mig-internal_transfer_with_agreed_amount
branch
from
June 18, 2024 15:47
5387ace
to
64c240c
Compare
luisg123v
approved these changes
Jun 18, 2024
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.
LGTM 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog:
attrs
with an expression for theinvisible
attribute in the view.