Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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?
I have been able to fix my problem by changing the code inside osv/expression.py
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 8/13/13, 9:18 PM|
|Seen: 667 times|
|Last updated: 3/16/15, 8:10 AM|