-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
[17.0][MIG] account_analytic_distribution_manual: Migration to 17.0 #700
base: 17.0
Are you sure you want to change the base?
[17.0][MIG] account_analytic_distribution_manual: Migration to 17.0 #700
Conversation
5febd1f
to
5ddf248
Compare
527842e
to
4a11424
Compare
Hi @pedrobaeza! I hope you're doing well! I’m facing some issues with the tests as they’re failing due to the tour, and I'm not sure how to resolve it. If you could lend a hand, I would really appreciate it! Thank you in advance! |
Not sure. We had a similar problem some weeks ago that was solved with this: OCA/oca-ci#78 @sbidoul @chienandalu do you have any clue? |
Thanks, @pedrobaeza! If there's anything I can assist with, just let me know. |
4a11424
to
ef9c240
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.
You need to change the tour first
...lytic_distribution_manual/static/src/tests/tours/account_analytic_distribution_manual.esm.js
Outdated
Show resolved
Hide resolved
...lytic_distribution_manual/static/src/tests/tours/account_analytic_distribution_manual.esm.js
Outdated
Show resolved
Hide resolved
be2a906
to
1c2324c
Compare
Hi @chienandalu! Thank you very much for your contribution! The changes have been applied, but now the tour fails at the step "Create new invoice" with the trigger .o_list_button_add. I'll take a closer look at this and see if I can resolve it. Thanks again for your help! |
Yes, now it's just a matter of debugging the steps 😉 |
1c2324c
to
f87beaa
Compare
f87beaa
to
379c043
Compare
158bf67
to
e90815d
Compare
e90815d
to
6e9004d
Compare
The tour tests are now working correctly. The issue lies with the tests themselves. I’m not sure why, but when running the tour directly through Odoo, everything works fine: analytic entries are generated as expected, and the other tests also pass without issues. However, when running Odoo tests that include the tour, it fails because it's not generating the analytic as intended. Do yo have any clue about why this can happen? Thanks in advance! @pedrobaeza @chienandalu |
Maybe @carlos-lopez-tecnativa can say. |
6e9004d
to
91623fe
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.
LGTM, tested in runboat and code review 👍
501221c
to
f020273
Compare
@carlos-lopez-tecnativa Thanks a lot for your time and valuable feedback! The bugs have been fixed. Could you please take another look and review the changes? |
I tested again, but the issues are still present. Could you review it once more? I’m not sure if network latency on Runboat could be related. 2024-12-23.15-02-42.mp4 |
Grabación de pantalla desde 2024-12-24 07-43-43.webm |
...distribution_manual/static/src/components/analytic_distribution/analytic_distribution.esm.js
Outdated
Show resolved
Hide resolved
f020273
to
9e8c2aa
Compare
@carlos-lopez-tecnativa Can you review again? Thanks for your time! |
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.
Tested and working fine. Please squash administrative commits(see https://github.com/OCA/maintainer-tools/wiki/Merge-commits-in-pull-requests). Thanks for the effort in the migration.
…complete analytic accounts on any model that has a field for analytic accounts.
Currently translated at 95.6% (22 of 23 strings) Translation: account-analytic-16.0/account-analytic-16.0-account_analytic_distribution_manual Translate-URL: https://translation.odoo-community.org/projects/account-analytic-16-0/account-analytic-16-0-account_analytic_distribution_manual/es/
…tics account from manual distribution - Show the current distribution selected at the top of the tags - When unselecting a distribution, all related analytic accounts are also unselected
… old data to new models(if table exists)
Currently translated at 100.0% (26 of 26 strings) Translation: account-analytic-16.0/account-analytic-16.0-account_analytic_distribution_manual Translate-URL: https://translation.odoo-community.org/projects/account-analytic-16-0/account-analytic-16-0-account_analytic_distribution_manual/it/
…teger to many2one - If the user needs to group by this field, it was impossible when it was an integer. - Added a script to populate the new field in models related to account_analytic_tags. Note: When multiple tags are present, only the last record is populated.
Currently translated at 100.0% (26 of 26 strings) Translation: account-analytic-16.0/account-analytic-16.0-account_analytic_distribution_manual Translate-URL: https://translation.odoo-community.org/projects/account-analytic-16-0/account-analytic-16-0-account_analytic_distribution_manual/it/
…tion_id into account.invoice.report
Currently translated at 100.0% (27 of 27 strings) Translation: account-analytic-16.0/account-analytic-16.0-account_analytic_distribution_manual Translate-URL: https://translation.odoo-community.org/projects/account-analytic-16-0/account-analytic-16-0-account_analytic_distribution_manual/it/
…export/import of analytical distributions TT50235
Currently translated at 100.0% (29 of 29 strings) Translation: account-analytic-16.0/account-analytic-16.0-account_analytic_distribution_manual Translate-URL: https://translation.odoo-community.org/projects/account-analytic-16-0/account-analytic-16-0-account_analytic_distribution_manual/it/
…d field to analytic items TT50751
Currently translated at 75.0% (24 of 32 strings) Translation: account-analytic-16.0/account-analytic-16.0-account_analytic_distribution_manual Translate-URL: https://translation.odoo-community.org/projects/account-analytic-16-0/account-analytic-16-0-account_analytic_distribution_manual/es/
Currently translated at 100.0% (32 of 32 strings) Translation: account-analytic-16.0/account-analytic-16.0-account_analytic_distribution_manual Translate-URL: https://translation.odoo-community.org/projects/account-analytic-16-0/account-analytic-16-0-account_analytic_distribution_manual/it/
…export/import to analytic.mixin Move the functionality to the analytic.mixin model so that it can also be used in account.move.line records TT50944
9e8c2aa
to
60f773d
Compare
@carlos-lopez-tecnativa Done! |
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.
Could you review this use case? It’s not working as expected
// When record is created, and manual_distribution_id is cleared | ||
// but user discard changes, we need to refresh the manual distribution | ||
const force_refresh_discart = new_manual_distribution_id === 0 && record_id > 0; | ||
if ( | ||
manual_distribution_Changed && | ||
(new_manual_distribution_id > 0 || force_refresh_discart) | ||
) { | ||
await this.refreshManualDistribution(new_manual_distribution_id); | ||
} |
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.
- Create an invoice, add a manual distribution, and save.
- Edit the invoice and remove the manual distribution.
- Focus on another element.
- Discard the changes.
Issue: The manual distribution is not displayed; it’s lost after discarding the changes
V17
V17.account_analytic_distribution_manual.mp4
V16
V16.account_analytic_distribution_manual.mp4
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.
The issue lies in the fact that the method willUpdate(nextProps) has been replaced with willUpdateRecord(record).
The challenge is that I can no longer determine whether force_refresh_discart should be applied, as this.props no longer includes this.props.record.data.id. This makes it impossible to track whether the user is discarding changes.
Do you have any suggestions on how to resolve this? I specifically need a reliable way to detect when the user discards changes so that I can apply the correct distribution.
Module migrated to version 17.0
cc https://github.com/APSL 161694
@miquelalzanillas @lbarry-apsl @mpascuall @peluko00 @javierobcn @ppyczko please review