The reason is very simple. I never have used RPC and don't know how to 
start.

Do I have to install local client package e.g. with pip so I can make 
"import tryton.rpc as rpc"?
We do talk about JSON-RPC, doesn't we? Or XML-RPC?

May you have links?
I found only old ones:
https://code.google.com/archive/p/tryton/wikis/RemoteCalls.wiki#XML-RPC_in_Python

Here are also not many informations:
http://doc.tryton.org/3.2/trytond/doc/ref/rpc.html

I have interests in doing it a better way.

thanks and regards




Am Dienstag, 22. März 2016 19:10:05 UTC+1 schrieb Cédric Krier:
>
> On 2016-03-22 09:57, TPH wrote: 
> > 
> > 
> > Am Dienstag, 22. März 2016 13:05:04 UTC+1 schrieb TPH: 
> > > 
> > > Hello, 
> > > 
> > > I just wrote this question in the German group, but I think here are 
> much 
> > > more people. Ill will keep both articles updated. 
> > > 
> > > What is the best way to get product stock directly from database? 
> > > 
> > > For a webshop / ebay sync I need the stock for every product of the 
> > > warehouse. I have tried this with proteus, but this is not fast 
> enough. 
> > > 
> > > So I am searching for an way, to get the actually stock of product on 
> the 
> > > warehouse. 
> > > 
> > > I think I have to use  "stock_location" and "stock_move". Maybe 
> someone 
> > > have already a snipped or can give me some hints. 
> > > 
> > > Thank you very much. 
> > > 
> > > 
> > This is now my first draft to get the stock directly from database, 
> first 
> > only for an specific product. Optimization tips are welcome. I don't 
> have 
> > sub-locations so I don't have to search for other locations then parent 
> = 
> > warehouse. 
>
> I still don't understand why you don't use the quantity on Product. 
> The Tryton code to compute the quantity is quite complex because it has 
> a lot of improvements that you will probably miss by reimplementing it 
> like: using SQL SUM (right order), reuse stock period cache, take care 
> of assignation, take care of the effective date etc. 
>
> If proteus is not fast enough when computing product per product, you 
> can make yourself the RPC call for the list of products. 
>
> -- 
> Cédric Krier - B2CK SPRL 
> Email/Jabber: cedric...@b2ck.com <javascript:> 
> Tel: +32 472 54 46 59 
> Website: http://www.b2ck.com/ 
>

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/f8f147ff-7f0d-4603-9ae7-5b8ce457b2b0%40googlegroups.com.

Reply via email to