Skip to content

Commit 525d9cf

Browse files
committed
[IMP] account: add search filter by amount on journal items
This change introduces a dedicated search filter for monetary values on account.move.line (Journal Items). Previously, searching directly by an exact or minimum amount was not possible. This commit allows users to filter using syntax like 'balance >= 1000'. To ensure comprehensive results, the filter checks the entered value against both the 'credit' and 'debit' fields simultaneously, guaranteeing that transactions matching the amount are returned regardless of whether they are recorded as a debit or a credit. task-5231308
1 parent 9ae5720 commit 525d9cf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

addons/account/views/account_move_views.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@
306306
<field name="name" string="Journal Item" filter_domain="[
307307
'|', '|', '|',
308308
('name', 'ilike', self), ('ref', 'ilike', self), ('account_id', 'ilike', self), ('partner_id', 'ilike', self)]"/>
309+
<field name="balance" string="Amount" filter_domain="['|', ('debit', '&gt;=', self), ('credit', '&gt;=', self)]" />
309310
<field name="name"/>
310311
<field name="ref"/>
311312
<field name="invoice_date"/>

0 commit comments

Comments
 (0)