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

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

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!