[FIX] point_of_sale: make background loading silent
Loading in background is supposed be background and not block UI after 3 sec of loading. STEPS: * In `pos.config` set `[x] Limited Products Loading`, and `[x] Load all remaining products in the background` * add enough products to POS, e.g. 40 000 * Open pos BEFORE: background loading triggers UI Blocking if it takes more than 3 seconds AFTER: products/partners are loaded in background without interrupting UI --- opw-2817770 closes odoo/odoo#88330 X-original-commit: 64232893886c6613212885a382b6f0732c091ef2 Signed-off-by: Masereel Pierre <pim@odoo.com>
This commit is contained in:
@@ -437,7 +437,7 @@ class PosGlobalState extends PosModel {
|
||||
offset: page * this.config.limited_products_amount,
|
||||
limit: this.config.limited_products_amount,
|
||||
}],
|
||||
});
|
||||
}, { shadow: true });
|
||||
this._loadProductProduct(products);
|
||||
page += 1;
|
||||
} while(products.length == this.config.limited_products_amount);
|
||||
@@ -459,7 +459,7 @@ class PosGlobalState extends PosModel {
|
||||
},
|
||||
],
|
||||
context: this.env.session.user_context,
|
||||
});
|
||||
}, { shadow: true });
|
||||
this.db.add_partners(partners);
|
||||
i += 1;
|
||||
} while(partners.length);
|
||||
|
||||
Reference in New Issue
Block a user