-
-
Notifications
You must be signed in to change notification settings - Fork 577
[18.0][MOD] account_payment_order: Restrict move line domain to no show cancel lines #1502
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][MOD] account_payment_order: Restrict move line domain to no show cancel lines #1502
Conversation
|
Could you please review this PR and share your comments regarding this suggested change? Your feedback will be very helpful to ensure we are aligning with the correct payment line behavior. |
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.
makes sense 👍🏼 Could you update commit message to use IMP instead of MOD?
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.
Both options are on purpose, as you may add reconcilable lines that are not AR/AP, and you may want to add draft lines to your payment order to prepare them for the future. When trying to reconcile, the system will give an error if the lines continue in draft.
In that case, would it perhaps be advisable to apply a filter that only excludes lines in the cancelled state? |
e8f3529 to
77b006c
Compare
77b006c to
6d1fd75
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.
Adding this "not cancel" extra condition is OK
|
This PR has the |
|
/ocabot merge patch |
|
On my way to merge this fine PR! |
|
Congratulations, your PR was merged at 4e67f88. Thanks a lot for contributing to OCA. ❤️ |
Is your feature request related to a problem?
Yes. The field
move_line_idinaccount.payment.lineis currently showing accounting entries that are in draft or cancelled state.Additionally, when an account has the reconcile flag enabled, entries from accounts like inventory or bank clearing accounts are displayed, even though they should not be selectable in payments.
This can cause wrong reconciliations and incorrect payment allocations.
Describe the solution you'd like
Restrict the domain of
move_line_idso that only posted receivable and payable move lines are shown.Proposed domain:
[('reconciled','=', False), ('account_id.reconcile', '=', True), ('parent_state', '=', 'posted'), ('account_id.account_type', 'in', ('asset_receivable', 'liability_payable'))]Describe alternatives you've considered
parent_state='posted': this still allows non-receivable/payable accounts to appear, which is not correct for payments.Additional context
By restricting the domain to posted receivable/payable move lines, we ensure that only valid customer and vendor entries are selectable, which matches the payment process and avoids reconciliation errors.