IRC logs of #tryton for Wednesday, 2017-10-25

chat.freenode.net #tryton log beginning Wed Oct 25 00:00:01 CEST 2017
2017-10-25 01:38 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2017-10-25 01:43 -!- giesen(~ggiesen@2001:19f0:0:1019:5400:ff:fe25:bda6) has joined #tryton
2017-10-25 03:44 -!- smarro_(~sebastian@168.90.86.179) has joined #tryton
2017-10-25 06:50 -!- hedererjs(~hedererjs@dig50-1-78-222-206-45.fbx.proxad.net) has joined #tryton
2017-10-25 08:42 -!- Marleyx(~jordan@111.red-88-3-80.dynamicip.rima-tde.net) has joined #tryton
2017-10-25 08:43 -!- rpit(~rpit@p200300C88BDEB00056EE75FFFE0DD3C7.dip0.t-ipconnect.de) has joined #tryton
2017-10-25 08:48 -!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton
2017-10-25 09:02 -!- mrichez(~smuxi@mail.saluc.com) has joined #tryton
2017-10-25 09:35 -!- meigallodixital(~meigallod@249.135.116.91.static.reverse-mundo-r.com) has joined #tryton
2017-10-25 09:36 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2017-10-25 10:21 -!- nicoe(~nicoe@host-85-201-184-151.dynamic.voo.be) has joined #tryton
2017-10-25 11:22 -!- thaneor(~ldlc6@r186-48-188-173.dialup.adsl.anteldata.net.uy) has joined #tryton
2017-10-25 11:32 <yangoon> top
2017-10-25 13:02 -!- mariomop(~quassel@181.95.1.10) has joined #tryton
2017-10-25 14:17 -!- smarro_(~sebastian@168.90.86.179) has joined #tryton
2017-10-25 14:27 -!- udono1(~udono@039-140-067-156.ip-addr.inexio.net) has joined #tryton
2017-10-25 14:30 -!- udono(~udono@039-140-067-156.ip-addr.inexio.net) has joined #tryton
2017-10-25 15:16 -!- csotelo_at_work(~csotelo@179.43.97.56) has joined #tryton
2017-10-25 15:17 -!- smarro(~sebastian@181.16.34.86) has joined #tryton
2017-10-25 15:28 <mrichez> hi, how to work in tip version with python3 in virtualenv? Do you develop in python3 or still in python2?
2017-10-25 15:32 <pokoli> mrichez: we develop on python2
2017-10-25 15:33 <mrichez> pokoli: ok. So how using set_trace_callback in sqlite3 for debuging query ?
2017-10-25 15:33 <pokoli> mrichez: you can develop with python3, but you should install the package on each change in order to execute the 2to3 conversion
2017-10-25 15:34 <pokoli> mrichez: you can lanuch the server with --dev and --verbose to see all the produced queries
2017-10-25 15:35 <mrichez> pokoli: already done but don't really see queries
2017-10-25 15:35 <mrichez> pokoli: doing a search on a domain, always the same results
2017-10-25 15:36 <mrichez> pokoli: so i would like to see the query
2017-10-25 15:37 <mrichez> pokoli: but set_trace_callback not working with python2
2017-10-25 15:39 <pokoli> mrichez: You can add print with the produced query on the code
2017-10-25 15:39 <pokoli> mrichez: it will be easier is only interested on a specific query
2017-10-25 15:39 <pokoli> mrichez: print tuple(Model.search([], query=True))
2017-10-25 15:39 <pokoli> mrichez: this will print the query and the parameters
2017-10-25 15:40 <mrichez> pokoli: thanks, will try this way.
2017-10-25 15:41 <pokoli> mrichez: you are welcome :)
2017-10-25 15:41 <mrichez> another question, is it better to use a search with a very specific domain, or being more global and doing tests inside a loop ?
2017-10-25 15:44 <pokoli> mrichez: better in terms of performance?
2017-10-25 15:45 <mrichez> pokoli: yes, it applies on products (so there's often a lot of products)
2017-10-25 15:46 <mrichez> pokoli: need to check a value with comparison then update a check box for the results
2017-10-25 15:47 <pokoli> mrichez: the best will be to fetch only the records that need to be updated in a single query
2017-10-25 15:48 <mrichez> pokoli: so doing this with a search on a very specific domain seems the best way ?
2017-10-25 15:49 <pokoli> mrichez: normally databases are optimized for performing queries
2017-10-25 15:49 <pokoli> mrichez: and can be improved with indexes if needed
2017-10-25 15:50 <mrichez> pokoli: ok thanks :-)
2017-10-25 15:51 <pokoli> mrichez: but if you are updating a computed value, probably it's worth to use a Functional field and don't update anything
2017-10-25 15:55 <mrichez> pokoli: field is not functional. i'm comparing product quantity to another quantity, but comparison seems not working (statements must have the same type error)
2017-10-25 15:56 <mrichez> pokoli: both fields are float ???
2017-10-25 15:57 <pokoli> mrichez: see http://hg.tryton.org/modules/stock/file/ee9453f214dd/product.py#l98
2017-10-25 16:01 <mrichez> pokoli: doing this comparison [('quantity', '>', Eval('qty_stock_min')] when i look in query i get True and True as parameters
2017-10-25 16:02 <pokoli> mrichez: you can not use eval in a search domain
2017-10-25 16:02 <pokoli> mrichez: could you explain what are you tryting to achieve?
2017-10-25 16:05 <mrichez> pokoli: searching products having a stock quantity under a specific defined quantity
2017-10-25 16:07 <pokoli> mrichez: but for each product you save the minimun quantity?
2017-10-25 16:07 <mrichez> pokoli: yes
2017-10-25 16:09 <pokoli> mrichez: are you aware of stock_supply module?
2017-10-25 16:10 <mrichez> pokoli: yes, but it's little bit different for us, we need to be alerted for negociation and not always for an automatic order
2017-10-25 16:11 -!- mariomop(~quassel@181.95.1.10) has joined #tryton
2017-10-25 16:11 <mrichez> pokoli: so we check for goods having a stock quantity under a specific value and displaying them in a view (running a cron to do the check)
2017-10-25 16:14 <pokoli> mrichez: I think it will be easier to customize the supply workflow and add some field there to indicate if there is the need for negotation only or for order
2017-10-25 16:17 <mrichez> pokoli: that's an idea but the "alert quantity" is not the same as the minimum quantity... because we need time for negociations (and delay for delivery is very long sometimes)
2017-10-25 16:18 <pokoli> mrichez: indeed I will understant that minimum quantity is what you call "alert quantity" and the purchase_threshold is a new added field
2017-10-25 16:18 <mrichez> pokoli: so if we do that on order point, some products will be out of stock before the reorder
2017-10-25 16:19 <pokoli> mrichez: so purchase requests will be created on alert quantity, and only purchased when under the purchase threshold
2017-10-25 16:21 <mrichez> pokoli: will think about this scenario. Thanks ! :-) I've to go..
2017-10-25 17:07 -!- JanGB(~jan@ipservice-092-208-134-251.092.208.pools.vodafone-ip.de) has joined #tryton
2017-10-25 17:40 -!- udono(~udono@039-140-067-156.ip-addr.inexio.net) has joined #tryton
2017-10-25 18:56 -!- JanGB(~jan@ipservice-092-208-134-251.092.208.pools.vodafone-ip.de) has joined #tryton
2017-10-25 19:01 -!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton
2017-10-25 19:07 -!- udono1(~udono@039-140-067-156.ip-addr.inexio.net) has joined #tryton
2017-10-25 19:10 -!- udono(~udono@039-140-067-156.ip-addr.inexio.net) has joined #tryton
2017-10-25 19:13 -!- udono1(~udono@039-140-067-156.ip-addr.inexio.net) has joined #tryton
2017-10-25 19:16 -!- udono(~udono@039-140-067-156.ip-addr.inexio.net) has joined #tryton
2017-10-25 19:18 -!- udono1(~udono@039-140-067-156.ip-addr.inexio.net) has joined #tryton
2017-10-25 19:20 -!- udono(~udono@039-140-067-156.ip-addr.inexio.net) has joined #tryton
2017-10-25 20:07 -!- JanGB(~jan@ipservice-092-208-134-251.092.208.pools.vodafone-ip.de) has joined #tryton
2017-10-25 22:01 -!- semarie_(~semarie@unaffiliated/semarie) has joined #tryton
2017-10-25 22:10 -!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton
2017-10-25 22:55 -!- smarro(~sebastian@2800:af0:1028:2503::2) has joined #tryton
2017-10-25 23:25 -!- thaneor1(~ldlc6@r186-48-90-201.dialup.adsl.anteldata.net.uy) has joined #tryton
2017-10-25 23:41 -!- JanGB(~jan@ipservice-092-208-134-251.092.208.pools.vodafone-ip.de) has joined #tryton

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!