[16.0][IMP] account_payment_order: filters account_id and analytic_account_id#1546
[16.0][IMP] account_payment_order: filters account_id and analytic_account_id#1546CristianoMafraJunior wants to merge 1 commit intoOCA:16.0from
Conversation
2d5950c to
6a536ec
Compare
|
review @rousseldenis @rvalyi? |
marcos-mendez
left a comment
There was a problem hiding this comment.
Automated Review -- Tests Passed
All tests for account_payment_order passed successfully on Odoo 16.0.
Environment: Minikube + K8s Job + oca-ci/py3.10-odoo16.0
Test Coverage Suggestions
Coverage Gaps
The new fields account_id and analytic_account_id in the wizard are added to the domain filter, but the current tests only check for negative filtering (i.e., when no matching lines are found). There are no tests validating:
- Positive filtering: When filters are applied and matching move lines are found.
- Combined filters: Both
account_idandanalytic_account_idused together. - Empty filter behavior: What happens when filters are left empty (should not restrict domain).
Suggested Test Cases
def test_wizard_filters_positive_account_match(self):
"""Test that wizard correctly finds move lines when account_id filter matches."""
# Create a move line with a specific account
# Apply wizard with that account
# Assert move_line_ids contains the expected line
def test_wizard_filters_positive_analytic_match(self):
"""Test that wizard correctly finds move lines when analytic_account_id filter matches."""
# Create a move line with analytic distribution
# Apply wizard with that analytic account
# Assert move_line_ids contains the expected line
def test_wizard_filters_combined_account_analytic(self):
"""Test that wizard correctly applies both account and analytic filters together."""
# Create move lines with specific account and analytic account
# Apply wizard with both filters
# Assert only matching lines are returnedCodecov Risk
No new methods or classes were added; the changes are limited to field additions and domain filtering logic. Since the domain logic is exercised by existing tests and the new fields are used in _prepare_move_line_domain, no significant Codecov risk is introduced. However, the new filters should be validated in positive test cases to ensure full coverage.
⏰ This PR has been open for 53 days.
Every ignored PR is a contributor who might not come back. Review time matters. (OCA Aging Report)
Reciprocal Review Request
Hi everyone! Thanks for your contribution to OCA. I reviewed and approved this PR. If any of you have a moment, I would really appreciate a review on my open PR(s):
My open PRs across OCA:
- hr-attendance#262 [16.0][ADD] Hr_attendance_idsecure: iDSecure (ControliD) attendance integration
- stock-logistics-workflow#2276 [16.0][ADD] stock_move_line_devaluation
- stock-logistics-workflow#2275 [16.0][ADD] Stock move line analytic account
- stock-logistics-workflow#2268 [16.0][ADD] stock_move_line_picking_partner
- purchase-workflow#2694 [16.0][IMP]Purchase workflow added to review state & exception fix
Reviewing each other's work helps the whole community move forward faster. Thank you!
Automated review by OCA Neural Reviewer + qwen3-coder:30b
@Escodoo HT01631
PR Description
Added two new filters to the
“Create Payment Lines from Journal Items”wizard (account.payment.line.create):Account (
account_id)Analytic Account / Cost Center (
analytic_account_id)These fields are now applied in the domain used to search journal items, including the “
Add All Move Lines” button, reducing the number ofaccount.move.linerecords loaded.Result: users can better isolate what they want to pay (by account and/or cost center), with fewer unwanted records and less manual line deletion.
cc @marcelsavegnago @kaynnan @WesleyOliveira98