Hi,

I created a scheduled job to do this kind of thing on a daily basis.
I now display 3M and 12M usage for all products.

Another way could be to use stored procedures on the database end. Performance would be 80x better.
ORM ~80ms per query
Postgres <1ms per query
Why do we not use stored procedures in OpenERP????
There is an awful lot of chit chat over the network for even a simple query.

Grahame


On 08/04/14 03:53, Ferdinand Gassauer wrote:
On 2014-04-03 10:12, Quentin THEURET wrote:

Please be realistic
If your business or boss needs data (products with qty !=0) the system has to provide it.
if not the user will
a) be unhappy and rant (problem of the partner)
b) export the product list and filter the list in excel
- this will take considerable more time (and cost) than let OpenERP compute and filter the data.

I once more emphasize that we have developed a generic server side sort and filter  function for v5 in which no one was interested.

OpenERP v8 should have this.

Le 24/01/2014 19:02, Serpent Consulting Services a écrit :
Today, one nice commit has been pushed which allows us to search stock
qtys on product:

http://bazaar.launchpad.net/~openerp-dev/openobject-addons/trunk-wms/revision/9522

Hi,

I watched this commit and I'm afraid of performance issues with a lot
of products (10,000 or more) when I read this:
    product_ids = self.search(cr, uid, [], context=context)
    ids = []
    if product_ids:
        #TODO: use a query instead of this browse record which is probably making the too much requests, but don't forget
        #the context that can be set with a location, an owner...
        for element in self.browse(cr, uid, product_ids, context=context):
            if eval(str(element[field]) + operator + str(value)):
                ids.append(element.id)

I saw the TODO but the problem is the context in this case. I've no
other solution to propose but I think it's not a good way.

Maybe we can look for other solution as cache values (by product /
location / prodlot…) computed periodically or at each stock move
creation/modification.

Regards,





--
Glass Expansion
15 Batman Street
West Melbourne
Victoria 3003
AUSTRALIA
T: +61 3 9320 1111
F: +61 3 9320 1112
www.geicp.com


Click here to check out our new TruFlo Sample Monitor

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp

Reply via email to