El 30/08/13 02:18, Cédric Krier escribió:
On 29/08/13 20:16 -0700, adriana.diaz.otalva...@gmail.com wrote:
Hi, Devs

I am using proteus with set_xmlrpc connection for access to a database with
3200 products, and I need create a list of tuples as (code, name) inside
model data and search widget for displaying in POS Client but the problem
is this take a long time  (10 minutes), so the client is very slow for
start, the code is:

          from proteus import config, Model, Wizard

          config.set_xmlrpc(url)

         _Product = Model.get('product.product')
         _products = _Product.find([('active', '=', True)])

         active_products = []
         for p in _products:
             active_products.append((p.code, p.template.name))

using set_trytond is faster than set_xmlrpc, but obviously on remote
connections it doesn't work.

How Can I solved this problem ?
Don't use proteus, it was not design for speed (even if some improvement
will be welcome) but to behaves like the client.
So for simple stufss like that why not just export to RPC a specific
method and call it via XML-RPC (with or without proteus).

Wow, Thank you very much Cedk, it's works fine and speed!

Reply via email to