[FIX] web: mockServer: push a mock view name in fieldviewGet
In the new mockServer, we add a name to a view (field name on ir.ui.view) when the found view in `fieldsViewGet`
has an id.
In tests data, one would normally specify default views like
```js
views = {
"partner,false,form": `<form></form>`,
}
```
In this case and from the point of view of the business code, the view doesn't really exist in DB
On the contrary, if a developer writes, in a test:
```js
views = {
"partner,999,form": `<form></form>`,
}
```
The returned view from load_views will return that view with ID 999 and, from the business code standpoint, the view would exist
in DB. This is particularly important in studio when it has to fetch a x2m view when none has been inlined in the main view.
This commit is contained in:
committed by
Aaron Bohy
parent
832ce8d1f9
commit
80dec11b15
@@ -145,6 +145,7 @@ export class MockServer {
|
||||
}
|
||||
if (viewId) {
|
||||
fvg.view_id = viewId;
|
||||
fvg.name = key;
|
||||
}
|
||||
return fvg;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user