Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

wouitmil
Copy link

This module allows disabling the nbrecords computation on widget domain fields

You'll then get this:
Screenshot 2023-10-28 at 13 16 11

Instead of this:
Screenshot 2023-10-28 at 13 15 05

Once installed, the domain widget won't compute the number of records by default for domain fields.

The default behaviour can be changed in settings
The default behaviour can be overridden on specific fields by adding {'autoFetch':true|false} on domain fields attrs attribute.

Screenshot 2023-10-28 at 13 13 52

@simahawk simahawk changed the title [FEAT] Domain field disable nbrecords computation [FEAT] web_ir_actions_act_view_reload: domain disable nbrecords computation Oct 31, 2023
@simahawk simahawk changed the title [FEAT] web_ir_actions_act_view_reload: domain disable nbrecords computation [ADD] web_widget_model_disable_nbrecords_computation Oct 31, 2023
@guewen
Copy link
Member

guewen commented Nov 1, 2023

Hi @wouitmil, looks like extra commits slipped in

@wouitmil wouitmil force-pushed the domain-field branch 5 times, most recently from a4a279b to 199867b Compare June 25, 2024 13:47
@pedrobaeza pedrobaeza added this to the 14.0 milestone Oct 31, 2024
@pedrobaeza
Copy link
Member

FYI, in 16.0, now this computation is optimized, showing 10.000+ if the number is higher for not having delays there. Maybe you can backport that feature for continuity (or migrate to 16 😉). Just a suggestion though. Nothing blocking, and I'm already in upper versions.

Copy link
Member

@yvaucher yvaucher left a comment

Choose a reason for hiding this comment

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

Would it be possible to keep the button to open related records?

Otherwise LGTM

) {
return Promise.resolve({
model: domainModel,
nbRecords: -1,
Copy link
Member

Choose a reason for hiding this comment

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

IIRC search with limit argument is only available since v15 or v16 so I guess we cannot make an efficient search using the ORM as it was done is newer Odoo version (as mentionned by @pedrobaeza )

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.

5 participants