-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
[14.0][ADD] module account_move_update_analytic #497
[14.0][ADD] module account_move_update_analytic #497
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.
Hello @remi-filament
Tested, it works. Maybe I should test it deeper 😄
Doubts about module name:
account_move_update_analytic
vs account_move_analytic_update
And finally a re-flexion trying to realize the best UX for accountants and financial responsible that I have recorded 😃
https://www.loom.com/share/a8c9edbb3bac493084f871e2df33a6a6
What do you think @remi-filament @fclementic2c ?
I'm just asking to know your opinion and thougts in order to get the best UX for the module.
We can of course if we agree contribute not only reviewing.
After that obviusly I will approve and merge!
Thank you @remi-filament for this great module and contribution!!!! ❤️
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.
Super really great work!
Some things can be tweaked but are minor fixes.
The most important for me is the use of parent_state
instead of parent.state
and adding the button in the account.view_move_line_tree_grouped
view
This is a code review without using the module on runboat
account_move_update_analytic/wizards/account_move_update_analytic.py
Outdated
Show resolved
Hide resolved
account_move_update_analytic/wizards/account_move_update_analytic.py
Outdated
Show resolved
Hide resolved
account_move_update_analytic/wizards/account_move_update_analytic.py
Outdated
Show resolved
Hide resolved
{"analytic_account_id": self.new_analytic_account_id.id or False} | ||
) | ||
if self.user_has_groups("analytic.group_analytic_tags"): | ||
self.line_id.write( |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
I removed the or [] but had to keep the [(6,0,xx)] otherwise it does not empty the field if you remove analytic tags
account_move_update_analytic/wizards/account_move_update_analytic_view.xml
Outdated
Show resolved
Hide resolved
<field name="company_id" invisible="1" /> | ||
<field | ||
name="new_analytic_tag_ids" | ||
domain="['|', ('company_id', '=', False), ('company_id', '=', company_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.
Same as above
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 missing view in view_move_line_tree_grouped
Hi @rafaelbn sorry for the delay in coming back to you !
I guess we can still add button on account_move_line tree views. Thanks ! |
4a844fe
to
aa61459
Compare
Thanks a lot @Shide for your comments, I updated accordingly ! @rafaelbn as proposed by @Shide I added the button in view_move_line_tree_grouped as well which was if I understood correctly what you were asking for ! Also I did not manage to use show/hide to hide the column with the button, nor adding a title to that column, I am not sure it is even feasible ? Let me know |
Thank you @remi-filament ! I found a BUG, check (2 min): https://www.loom.com/share/a274be3a321a4ae3986ee705cf7e94ea |
@remi-filament , Spain is similar, I mean, and invoice is not accounting even Odoo made same model. Change an account is not change an invoice, invoicing means more amount and taxes, accounting go in other hand. Futhermore, the change is not allowed for full invoice just for income or outcome (expenses). Accounting Reclassification si common. For example, when we invoice and send it in real time to administration you are not sending accounts, just amount base, tax, vat, types... the accounting is later, usually once a year. I'm working for multi-nationals companies with monthly closing accounting, they are really strict, but accountants sometimes fails and they have to reclassify accounting before closing (and should be really fast), and this is legal if you don't change taxes or amounts that you previously have sent. Do you see the differences? |
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.
Please check this. I found a BUG, check (2 min): https://www.loom.com/share/a274be3a321a4ae3986ee705cf7e94ea
Hi @rafaelbn I went quickly over the code of all modules in this repo but cannot find the culprit... Also, regarding your other point, I am not used to update these fields as an accountant but I guess the addition of the button on account move line grouped tree view is what you expected ? |
I managed to find the culprit I think, when uninstalling account_analytic_tag_default the expected behavior is back.
|
Hello @remi-filament ,
No by the moment. On monday we will return to this PR to get it reviewed and merge next week 👍 Thank you @remi-filament !! 🙏 |
I think it's not possible right now. |
@remi-filament I have one question: Why not make the field not-readonly and allow the user edit directly from the tree lines? The multi selection + inline tree editing allows to edit all the lines with the same analytic accounts at once. |
Hi @Shide thanks for looking again into it !
Actually, the problem is not only updating analytic account or tags on account_move_lines, this could indeed be done as you suggest, however you need to update / delete / create account_analytic_lines and/or account_analytic_tags which are related to these account_move_lines. I agree though that we could go further and make a mass edit wizard that would update analytic account and analytic tags on multiple lines at once, but this was not my initial use case, and I like to know that I am changing from this account to this new account which I think is more difficult to get if you change multiple lines at once, so that would need more thinking about UX ! |
Ok, then It's fine for me 😄 |
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
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.
Thanks!🙂 👍
@fclementic2c we are going to migrate to v15 if you would like to test it for any improvement, you are really welcome
/ocabot merge nobump
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at b503816. Thanks a lot for contributing to OCA. ❤️ |
Add new module allowing to update analytic account and tags on posted moves
(Note that although model has changed, this is now allowed in v16)
Moved to this repo from OCA/account-financial-tools#1485
@rafaelbn @fclementic2c I have mode module here as suggested, also I have added the handling of analytic tags.
Let me know your thoughts !