[6.1/trunk] Slow product price list
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Confirmed
|
Low
|
OpenERP R&D Addons Team 2 |
Bug Description
Hey,
Fetching a product list (80) based on a pricelist, it's slow because of the the amount of product categories.
Ex.
- All Product
- Import Supp001 Category
- Import Supp002 Category
- Import Supp003 Category
- Import Supp004 Category
==> with around a total of 2400 categories
in product/
--> function "price_get_multi" > line 185:
# product.category:
product_
product_
product_
==> this will always fetch all categories for each product in the list and is used to get the parents categories of the product
which is used then in "_create_
Possible fix is:
We have then disabled the full search of the categories and rewrite the "_create_
>>>
def _create_
if not categ_id:
return []
category = product_
if category.parent_id:
lst.append( category.
return lst
# _create_
maybe not the best solution, but we go from 15sec -> 1.4 sec for fetching the list.
RevNo:
- Addons : 6850
- Web : 2364
- Server : 4212
Hello,
Yes, I agreed We have to use browse instead on search/read. It fetches all the record.Also it's not a blocking point that's why I am assigning this as a "low" importance.
Thanks!