-
-
Notifications
You must be signed in to change notification settings - Fork 763
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
[ADD] account_reversal_usability #1771
Conversation
f51b290
to
821b282
Compare
Hello @sbidoul , |
3d66cd8
to
ce3e7ec
Compare
_inherit = "account.move" | ||
|
||
to_be_reversed = fields.Boolean( | ||
compute="_compute_to_be_reversed", |
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.
IMO, this field can be managed by account.move.reversal
class AccountMoveReversal(models.TransientModel):
_inherit = "account.move.reversal"
def reverse_moves(self):
self.move_ids.write({"to_be_reversed": False})
return super().reverse_moves()
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.
As agreed, we finally go for overriding the account.move
._reverse_moves
This commit adds the account_reversal_usability module which purpose is to improve the usability of the move line reverse functionality by adding: * a field that allows tagging a move line as needing to be reversed. The value of the field gets automatically set to False once a reversed entry is made. * a filter in the search view that allows selecting the moves that are flagged as needing to be reversed. * the reverse move in the form view
ce3e7ec
to
7f5f9f2
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, thank you!
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.
A couple of comments/question, otherwise looks good to me. Technical review and functional test on runboat.
the field gets automatically set to False once a reversed entry is made. | ||
* a filter in the search view that allows selecting the moves that are flagged as | ||
needing to be reversed. | ||
* the reverse move in the form view""", |
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.
Do this "big" summary display well in Odoo? Otherwise we can keep (the first sentence may be enough).
|
||
def _reverse_moves(self, default_values_list=None, cancel=False): | ||
res = super()._reverse_moves(default_values_list, cancel) | ||
self.to_be_reversed = False |
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.
Does it now work to assign a value to a set of multiple records at once?
Closing this PR as already handled in #1725 |
This commit adds the account_reversal_usability module which purpose is to improve the usability of the move line reverse functionality by adding:
Fixes #1761