跳至内容
菜单
此问题已终结
1 回复
3672 查看

Hi,

we have 85000+ products mainly because we have many variable for the same product. Multiple width, height and material which translate in a lot of product. Our problem is that with that when we try to make a search using the name field, it timeouts. I tracked down the psql request and when I run the request in the psql console, it never end. The request is the fallow:

SELECT "product_product".id FROM "product_product","product_template" WHERE ((product_product."active" = 'True') AND ((product_product."id" in ((SELECT res_id FROM ir_translation WHERE name = 'product.product,name' AND lang = 'en_US' AND type = 'model' AND value ilike '%SAM-A%') UNION (SELECT id FROM "product_product" WHERE "name" ilike '%SAM-A%'))) OR (product_product."default_code" ilike '%SAM-A%'))) AND (product_product.product_tmpl_id = product_template.id) AND (((product_template."company_id" in (1))  OR  (product_template."company_id" in (1)))  OR  product_template."company_id" IS NULL ) ORDER BY default_code,name_template limit 100

There's definitely a problem with the request. Anyone got suggestion?

EDIT:

I have been able to fix my problem by changing the code inside osv/expression.py

形象
丢弃
最佳答案

I tried this fix and works very well. h_t_t_p_s://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-574218-xal/+merge/10737

形象
丢弃
相关帖文 回复 查看 活动
2
12月 23
20078
1
3月 15
3776
2
3月 15
4207
1
12月 23
20981
1
1月 24
15330