diff --git a/changelogs/unreleased/87258.json b/changelogs/unreleased/87258.json new file mode 100644 index 0000000000..bb50520a77 --- /dev/null +++ b/changelogs/unreleased/87258.json @@ -0,0 +1,5 @@ +{ + "title": "Modules: improved search to remove the 40-response limit", + "type": "fix", + "packages": "core" +} diff --git a/packages/core/src/api/meta-module-api.ts b/packages/core/src/api/meta-module-api.ts index 57404e1997..cb8c982c25 100644 --- a/packages/core/src/api/meta-module-api.ts +++ b/packages/core/src/api/meta-module-api.ts @@ -16,8 +16,14 @@ * along with this program. If not, see . */ -import {axiosApiProvider} from '../apiProviders'; +import {createStandardSearch} from '../apiProviders'; -export const getAllMetaModules = () => { - return axiosApiProvider.get({url: 'ws/rest/com.axelor.meta.db.MetaModule'}); -}; +export async function getAllMetaModules({}) { + return createStandardSearch({ + model: 'com.axelor.meta.db.MetaModule', + fieldKey: 'core_module', + numberElementsByPage: null, + page: 0, + provider: 'model', + }); +} diff --git a/packages/core/src/models/objectFields.ts b/packages/core/src/models/objectFields.ts index 6497b7e0ba..f04cf8b478 100644 --- a/packages/core/src/models/objectFields.ts +++ b/packages/core/src/models/objectFields.ts @@ -53,4 +53,8 @@ export const core_modelAPI: ObjectFields = { }), ), }), + core_module: schemaContructor.object({ + moduleVersion: schemaContructor.string(), + name: schemaContructor.string(), + }), };