[FIX] web: set loadIrFilters to true

Steps to reproduce:
- install "sale_management" module;
- create a quotation;
- add a product;
- click on "Search More...";
- create a favorite filter;
- leave and return to the Dialog window.

Issue:
No previously saved filter appears.

Cause:
The `loadIrFilters` parameter has a default value equal to `false`.

Solution:
Set the value of the `loadIrFilters` parameter to `true`.

opw-3105096

closes odoo/odoo#108946

X-original-commit: 7b60ee37e31d92d79108bd4e472553a452c2b0be
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
This commit is contained in:
Thomas Lefebvre (thle)
2023-01-02 20:39:51 +01:00
parent 3aeed55764
commit f100decbf4
2 changed files with 5 additions and 1 deletions
@@ -30,6 +30,7 @@ export class SelectCreateDialog extends Component {
get viewProps() {
const type = this.env.isSmall ? "kanban" : "list";
const props = {
loadIrFilters: true,
...this.baseViewProps,
context: this.props.context,
domain: this.props.domain,
@@ -342,7 +342,7 @@ QUnit.module("ViewDialogs", (hooks) => {
});
QUnit.test("SelectCreateDialog: save current search", async function (assert) {
assert.expect(4);
assert.expect(5);
serverData.views = {
"partner,false,list": `
@@ -385,6 +385,9 @@ QUnit.module("ViewDialogs", (hooks) => {
);
return 7; // fake serverSideId
}
if (args.method === "get_views") {
assert.equal(args.kwargs.options.load_filters, true, "Missing load_filters option");
}
};
patchWithCleanup(browser, { setTimeout: (fn) => fn() });
const webClient = await createWebClient({ serverData, mockRPC });