Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[18.0][MIG] account_move_tier_validation:Migration to 18 #1921

Open
wants to merge 55 commits into
base: 18.0
Choose a base branch
from

Conversation

aarosales-spearhead
Copy link

Replace #1830

pegonzalezspesol and others added 30 commits February 21, 2025 18:51
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-invoicing-14.0/account-invoicing-14.0-account_move_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-14-0/account-invoicing-14-0-account_move_tier_validation/
* 'Validation In Progress' so as to allow an easy location of the
   invoices for which a validation has been triggered,
   but it is not yet completed.
* 'Validation Not Started' to locate bills that either require
   no validation, or the request for validation has not yet been initiated.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-invoicing-14.0/account-invoicing-14.0-account_move_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-14-0/account-invoicing-14-0-account_move_tier_validation/
Currently translated at 100.0% (27 of 27 strings)

Translation: account-invoicing-14.0/account-invoicing-14.0-account_move_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-14-0/account-invoicing-14-0-account_move_tier_validation/sv/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-invoicing-15.0/account-invoicing-15.0-account_move_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-15-0/account-invoicing-15-0-account_move_tier_validation/
JordiBForgeFlow and others added 25 commits February 21, 2025 19:06
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-invoicing-15.0/account-invoicing-15.0-account_move_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-15-0/account-invoicing-15-0-account_move_tier_validation/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: account-invoicing-16.0/account-invoicing-16.0-account_move_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-account_move_tier_validation/
Currently translated at 100.0% (26 of 26 strings)

Translation: account-invoicing-16.0/account-invoicing-16.0-account_move_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-account_move_tier_validation/es/
Currently translated at 100.0% (27 of 27 strings)

Translation: account-invoicing-16.0/account-invoicing-16.0-account_move_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-account_move_tier_validation/es/
Currently translated at 100.0% (27 of 27 strings)

Translation: account-invoicing-16.0/account-invoicing-16.0-account_move_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-account_move_tier_validation/sv/
…moves with tier validation

Added tests for changes

Updated error to be checked in tests

Updated error to be checked in tests
Currently translated at 100.0% (28 of 28 strings)

Translation: account-invoicing-16.0/account-invoicing-16.0-account_move_tier_validation
Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-account_move_tier_validation/it/
Edit a new journal entry with lines in currency X different from company currency Y.
Say you have a line of value (amount_currency) N, which is converted to Y(N) (debit/credit).
Then `amount_total` is also N. Because the `readonly="not(review_ids)"` was added, `amount_total` is dirty and sent at save.
Therefore, Odoo uses it and sets the debit/credit values of the lines to N (instead of Y(N), the converted value).
It's as if it's ignoring the currency conversion (note that the values are correct through onchange before the save).

To avoid this, exclude the field from being modified in `get_view`.
Copy link

@celm1990 celm1990 left a comment

Choose a reason for hiding this comment

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

LGTM, just a minor change

@xaviedoanhduy @pedrobaeza @bosd @StefanRijnhart could you please review this?

Comment on lines +13 to +17
class TestAccountTierValidation(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))

Choose a reason for hiding this comment

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

This class can inherit from BaseCommon, allowing setUpClass to be removed.

Copy link
Contributor

@bosd bosd left a comment

Choose a reason for hiding this comment

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

Functional test on runboat

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

Successfully merging this pull request may close these issues.