IRC logs of #tryton for Wednesday, 2017-10-25 #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@ has joined #tryton03:44
-!- hedererjs( has joined #tryton06:50
-!- Marleyx( has joined #tryton08:42
-!- rpit( has joined #tryton08:43
-!- Timitos( has joined #tryton08:48
-!- mrichez( has joined #tryton09:02
-!- meigallodixital( has joined #tryton09:35
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:36
-!- nicoe( has joined #tryton10:21
-!- thaneor( has joined #tryton11:22
-!- mariomop(~quassel@ has joined #tryton13:02
-!- smarro_(~sebastian@ has joined #tryton14:17
-!- udono1( has joined #tryton14:27
-!- udono( has joined #tryton14:30
-!- csotelo_at_work(~csotelo@ has joined #tryton15:16
-!- smarro(~sebastian@ 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([], 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
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@ 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( has joined #tryton17:07
-!- udono( has joined #tryton17:40
-!- JanGB( has joined #tryton18:56
-!- Telesight( has joined #tryton19:01
-!- udono1( has joined #tryton19:07
-!- udono( has joined #tryton19:10
-!- udono1( has joined #tryton19:13
-!- udono( has joined #tryton19:16
-!- udono1( has joined #tryton19:18
-!- udono( has joined #tryton19:20
-!- JanGB( has joined #tryton20:07
-!- semarie_(~semarie@unaffiliated/semarie) has joined #tryton22:01
-!- Telesight( has joined #tryton22:10
-!- smarro(~sebastian@2800:af0:1028:2503::2) has joined #tryton22:55
-!- thaneor1( has joined #tryton23:25
-!- JanGB( has joined #tryton23:41

Generated by 2.11.0 by Marius Gedminas - find it at!