Skip to content

[IMP] account: Allow searching on amount in move lines #4798

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

Open
wants to merge 1 commit into
base: 18.0-rd-accounting-onboarding-malb
Choose a base branch
from

Conversation

mograby3500
Copy link

@mograby3500 mograby3500 commented Jul 1, 2025

This commit aims to add the ability for users
to search on records with (debit, credit or balance) that matches the search keyword.

Task-4908897

@robodoo
Copy link

robodoo commented Jul 1, 2025

This PR targets the un-managed branch odoo-dev/odoo:18.0-rd-accounting-onboarding-malb, it needs to be retargeted before it can be merged.

Copy link

@malb-odoo malb-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one small nitpick

'|', '|', '|',
('name', 'ilike', self), ('ref', 'ilike', self), ('account_id', 'ilike', self), ('partner_id', 'ilike', self)]"/>
'|', '|', '|', '|', '|', '|',
('debit', 'ilike', self), ('credit', 'ilike', self), ('balance', 'ilike', self), ('name', 'ilike', self), ('ref', 'ilike', self), ('account_id', 'ilike', self), ('partner_id', 'ilike', self)]"/>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to follow the functional need create a new filter call Amount 😄

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@malb-odoo Done, thanks for the review!

@mograby3500 mograby3500 force-pushed the 18.0-rd-accounting-onboarding-allow-search-on-amount-in-move-line-alah branch from ee83a4f to b97a185 Compare July 2, 2025 14:44
@@ -305,6 +305,8 @@
<field name="name" string="Journal Item" filter_domain="[
'|', '|', '|',
('name', 'ilike', self), ('ref', 'ilike', self), ('account_id', 'ilike', self), ('partner_id', 'ilike', self)]"/>
<field name="debit" string="Amount" filter_domain="[
'|', '|', ('debit', 'ilike', self), ('credit', 'ilike', self), ('balance', 'ilike', self)]"/>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact no need to check the balance since the balance is just the sign version of the debit and credit, so

Suggested change
'|', '|', ('debit', 'ilike', self), ('credit', 'ilike', self), ('balance', 'ilike', self)]"/>
['|', ('debit', 'ilike', self), ('credit', 'ilike', self)]"/>

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@mograby3500 mograby3500 force-pushed the 18.0-rd-accounting-onboarding-allow-search-on-amount-in-move-line-alah branch 2 times, most recently from 1ca3ee3 to 597eef0 Compare July 3, 2025 08:34
@@ -305,6 +305,8 @@
<field name="name" string="Journal Item" filter_domain="[
'|', '|', '|',
('name', 'ilike', self), ('ref', 'ilike', self), ('account_id', 'ilike', self), ('partner_id', 'ilike', self)]"/>
<field name="debit" string="Amount" filter_domain="[
'|', ('debit', 'ilike', self), ('credit', 'ilike', self)]"/>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In one line and it would be perfect but will not block for that it's not the point of the onboarding 😄

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

This commit aims to add the ability for users
to search on records with (debit, credit or balance) that
matches the search keyword.

task-4908897
@mograby3500 mograby3500 force-pushed the 18.0-rd-accounting-onboarding-allow-search-on-amount-in-move-line-alah branch from 597eef0 to 6d35198 Compare July 3, 2025 09:15
Copy link

@malb-odoo malb-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noiiceeee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants