[FIX] base, web: graph and pivot views requires more field descriptions
Following odoo/odoo@4636620004 `get_views` only pass the model fields included in the view architecture, except for the main model when the search views is requested. Because the search views requires all fields for the user to be able to make advanced filters and advanced group by using any fields of the model. However, other views requires more field descriptions as well than just the fields included in their architecture: - the graph view requires all integer and float fields, to automatically add suggestions of measures in the measures dropdown menu. It's a bit like the search view, the user should be able to choose any measure available in the model (as long as this is integer or float fields) - the pivot view requires all groupable fields, so the user can group by any groupable fields of the model. The JS MockServer `getViews` is adapted to include the changes added by the above revision as well as the current revision, for the qunit tests suite to be able to reflect these API changes from the server side. closes odoo/odoo#100376 Related: odoo/enterprise#31427 Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
This commit is contained in:
@@ -1992,7 +1992,7 @@ patch(MockServer.prototype, 'mail', {
|
||||
* Simulates `_message_track` on `mail.thread`
|
||||
*/
|
||||
_mockMailThread_MessageTrack(modelName, trackedFieldNames, initialTrackedFieldValuesByRecordId) {
|
||||
const trackFieldNamesToField = this.mockFieldsGet(modelName, [trackedFieldNames]);
|
||||
const trackFieldNamesToField = this.mockFieldsGet(modelName, trackedFieldNames);
|
||||
const tracking = {};
|
||||
const records = this.models[modelName].records;
|
||||
for (const record of records) {
|
||||
|
||||
Reference in New Issue
Block a user