-
-
Notifications
You must be signed in to change notification settings - Fork 2k
[ADD] web_widget_model_disable_nbrecords_computation #2648
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
base: 14.0
Are you sure you want to change the base?
Conversation
web_widget_model_disable_nbrecords_computation/static/description/index.html
Outdated
Show resolved
Hide resolved
web_widget_model_disable_nbrecords_computation/static/description/index.html
Outdated
Show resolved
Hide resolved
Hi @wouitmil, looks like extra commits slipped in |
a4a279b
to
199867b
Compare
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. |
There was a problem hiding this 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
web_widget_model_disable_nbrecords_computation/static/src/xml/base.xml
Outdated
Show resolved
Hide resolved
) { | ||
return Promise.resolve({ | ||
model: domainModel, | ||
nbRecords: -1, |
There was a problem hiding this comment.
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 )
8449017
to
84caccb
Compare
84caccb
to
bb0a573
Compare
This module allows disabling the nbrecords computation on widget domain fields
You'll then get this:

Instead of this:

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.