[IMP] account: add Reversed payment filter to invoice search view

Moves with a reversed payment_state are not included in the domain of the
"Paid", "Unpaid" or "Overdue" filters. This means that it is not possible to
display reversed invoices when using any combination of these filters.

In this case, it is preferable to be able to encompass the entire range of
possible states with a combination of filters. so rather than adding the
reversed payment state to the domain of the "Paid" filter (since reversed
payments aren't strictly "Paid"), this commit instead adds a new filter
"Reversed" with its domain set to include reversed payment invoices only.

closes odoo/odoo#160581

X-original-commit: 43a9b7afe4418fda10083fe7ced7744f0d93f79a
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
This commit is contained in:
Rocío Vega
2024-04-05 04:49:17 +00:00
parent 561cb2da84
commit d37ac62d75
@@ -1467,6 +1467,8 @@
<filter name="open" string="Unpaid" domain="[('state', '=', 'posted'), ('payment_state', 'in', ('not_paid', 'partial'))]"/>
<!-- in_payment & paid -->
<filter name="closed" string="Paid" domain="[('state', '=', 'posted'), ('payment_state', 'in', ('in_payment', 'paid'))]"/>
<!-- reversed -->
<filter name="reversed" string="Reversed" domain="[('state', '=', 'posted'), ('payment_state', '=', 'reversed')]"/>
<!-- overdue -->
<filter name="late" string="Overdue" domain="[
('invoice_date_due', '&lt;', time.strftime('%Y-%m-%d')),