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

[18.0][MIG] account_move_base_import: migration to 18.0 #797

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

Conversation

Ricardoalso
Copy link

No description provided.

mdietrichc2c and others added 30 commits February 11, 2025 14:45
Force import partner on account.move
…econciled to false to avoid having a null value instead
When importing a batch for a journal which has a currency different from the
company currency, the values in the batch files are in the currency of the journal.
The previous code was creating move lines as if the amounts in the batch file were in
the company currency.

We fix this by checking for the case, and converting the amounts the company currency at
the rate of the date of the transaction to fill in the credit / debit columns, and setting the
value of amount_currency to the value in the batch file.
adrianojprado and others added 16 commits February 11, 2025 14:56
Currently translated at 37.9% (41 of 108 strings)

Translation: account-reconcile-16.0/account-reconcile-16.0-account_move_base_import
Translate-URL: https://translation.odoo-community.org/projects/account-reconcile-16-0/account-reconcile-16-0-account_move_base_import/pt_BR/
Currently translated at 100.0% (108 of 108 strings)

Translation: account-reconcile-16.0/account-reconcile-16.0-account_move_base_import
Translate-URL: https://translation.odoo-community.org/projects/account-reconcile-16-0/account-reconcile-16-0-account_move_base_import/es/
Currently translated at 0.9% (1 of 108 strings)

Translation: account-reconcile-16.0/account-reconcile-16.0-account_move_base_import
Translate-URL: https://translation.odoo-community.org/projects/account-reconcile-16-0/account-reconcile-16-0-account_move_base_import/fr/
Currently translated at 100.0% (108 of 108 strings)

Translation: account-reconcile-16.0/account-reconcile-16.0-account_move_base_import
Translate-URL: https://translation.odoo-community.org/projects/account-reconcile-16-0/account-reconcile-16-0-account_move_base_import/es/
Currently translated at 20.3% (22 of 108 strings)

Translation: account-reconcile-16.0/account-reconcile-16.0-account_move_base_import
Translate-URL: https://translation.odoo-community.org/projects/account-reconcile-16-0/account-reconcile-16-0-account_move_base_import/ca/
Currently translated at 11.1% (12 of 108 strings)

Translation: account-reconcile-16.0/account-reconcile-16.0-account_move_base_import
Translate-URL: https://translation.odoo-community.org/projects/account-reconcile-16-0/account-reconcile-16-0-account_move_base_import/it/
Currently translated at 100.0% (108 of 108 strings)

Translation: account-reconcile-16.0/account-reconcile-16.0-account_move_base_import
Translate-URL: https://translation.odoo-community.org/projects/account-reconcile-16-0/account-reconcile-16-0-account_move_base_import/pt_BR/
…e custom logic (multiple commission fields for instance)
Currently translated at 100.0% (107 of 107 strings)

Translation: account-reconcile-16.0/account-reconcile-16.0-account_move_base_import
Translate-URL: https://translation.odoo-community.org/projects/account-reconcile-16-0/account-reconcile-16-0-account_move_base_import/sv/
Currently translated at 21.4% (23 of 107 strings)

Translation: account-reconcile-16.0/account-reconcile-16.0-account_move_base_import
Translate-URL: https://translation.odoo-community.org/projects/account-reconcile-16-0/account-reconcile-16-0-account_move_base_import/ca/
Currently translated at 39.2% (42 of 107 strings)

Translation: account-reconcile-16.0/account-reconcile-16.0-account_move_base_import
Translate-URL: https://translation.odoo-community.org/projects/account-reconcile-16-0/account-reconcile-16-0-account_move_base_import/it/
Currently translated at 100.0% (107 of 107 strings)

Translation: account-reconcile-16.0/account-reconcile-16.0-account_move_base_import
Translate-URL: https://translation.odoo-community.org/projects/account-reconcile-16-0/account-reconcile-16-0-account_move_base_import/pt_BR/
@Ricardoalso Ricardoalso force-pushed the 18.0-mig-account_move_base_import branch from babc52c to 9892aa5 Compare February 11, 2025 14:36
@Ricardoalso Ricardoalso marked this pull request as draft February 11, 2025 15:03
@Ricardoalso Ricardoalso marked this pull request as ready for review February 11, 2025 15:05
@Ricardoalso Ricardoalso force-pushed the 18.0-mig-account_move_base_import branch 3 times, most recently from 05ec25e to 6a0582e Compare February 11, 2025 16:20
@Ricardoalso Ricardoalso force-pushed the 18.0-mig-account_move_base_import branch from 6a0582e to cefbed8 Compare February 11, 2025 16:24
@@ -11,7 +11,6 @@
domain="[('used_for_import', '=', True)]"
/>
<field name="input_statement" filename="file_name" />
<field name="file_name" invisible="1" />

Choose a reason for hiding this comment

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

You sure about this one ? It won't fail because it does not find file_name in view ?

Copy link
Author

Choose a reason for hiding this comment

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

Based on the migration documentation for V18

Missing fields used in domains and other attributes are added to the view as invisible automatically. If you encounter fields in views with invisible="True", they can probably be removed. Reference: odoo/odoo#137031


I am not familiar with this module but in the runbot it seams to work like expected
image

Choose a reason for hiding this comment

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

Oh I missed this one in the V18 doc, thanks for pointing it out !

Comment on lines +224 to +226
"Move %(move_name)s have been imported with %(num_lines)s " "lines."
)
% {"move_name": move.name, "num_lines": num_lines}

Choose a reason for hiding this comment

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

Suggested change
"Move %(move_name)s have been imported with %(num_lines)s " "lines."
)
% {"move_name": move.name, "num_lines": num_lines}
"Move %(move_name)s have been imported with %(num_lines)s lines.",
move_name=move.name,
num_lines=num_lines,
)

nitpicking

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Copy link

@houssine78 houssine78 left a 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.