IRC logs of #tryton for Thursday, 2019-03-21

chat.freenode.net #tryton log beginning Thu Mar 21 00:00:01 CET 2019
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton00:44
-!- shard_(~shard@223.74.176.48) has joined #tryton02:10
-!- yangoon1(~mathiasb@i59F4FE89.versanet.de) has joined #tryton03:06
-!- kapil____(uid36151@gateway/web/irccloud.com/x-vkkfgmtailwucuyy) has joined #tryton04:53
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton06:19
-!- thaneor(~lenovo3@r179-24-113-156.dialup.adsl.anteldata.net.uy) has joined #tryton06:29
-!- udono(~udono@183-058-210-188.ip-addr.inexio.net) has joined #tryton07:02
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton07:04
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton07:49
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton08:16
alexbodngood morning friends, pokoli, cedk09:06
-!- rpit(~rpit@p200300C88F3074009483377F147C344D.dip0.t-ipconnect.de) has joined #tryton09:10
alexbodni've looked at tryton through the clients, the gtk local one and the sao web client and it looks beautiful indeed. i don't see the full correspondence between the labels on the screen and the model fields organization: not all the fields are in the same model / table. could i please see the proteus program that you use to load the demo db?09:12
-!- rpit(~rpit@p4FFB7256.dip0.t-ipconnect.de) has joined #tryton09:16
-!- nicoe(~nicoe@host-85-201-184-151.dynamic.voo.be) has joined #tryton09:19
-!- Springwurm_(~Springwur@5.104.149.54) has joined #tryton09:32
-!- Springwurm_(~Springwur@5.104.149.54) has left #tryton09:33
-!- springwurm(~Springwur@5.104.149.54) has left #tryton09:33
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton09:33
-!- Springwurm_(~Springwur@5.104.149.54) has joined #tryton09:35
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton09:35
-!- rpit(~rpit@p200300C88F307400C2CDE6C91283B9CF.dip0.t-ipconnect.de) has joined #tryton09:38
pokolialexbodn: http://hg.tryton.org/tryton-tools/file/9c47c389f87c/tryton_demo.py10:40
-!- csotelo(~csotelo@181.67.16.48) has joined #tryton10:47
-!- rpit(~rpit@p4FFB7256.dip0.t-ipconnect.de) has joined #tryton10:47
-!- mariomop(~quassel@host155.186-109-209.telecom.net.ar) has joined #tryton10:51
alexbodnthank you very very much pokoli. i see clear examples of code i've missed.11:15
alexbodnproteus is a true client. kudos11:15
pokolialexbodn: yes, it is the tryton client from commandline and mimics as much as possible the standard client11:20
pokolialexbodn: it's a very good solution for running e2e test with our code11:21
springwurmalexbodn; i think another great resources, are the test scenarios: e.g. http://hg.tryton.org/modules/sale/file/tip/tests/scenario_sale.rst11:24
alexbodnyes, until now i found my way through the test files, but they didn't always create complete objects, thus my appeal to a true client. a big warm thank you for accepting my queer way to learn. i have applied to nantic that support universities and asked for a background theoretic book on erp.12:03
alexbodnthe rst scenariouses are very cool too. thanks again pokoli. thanks author cedk12:07
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton13:23
mrichezhi, any tips to order a date function field which is a timedelta based on a date and a value from another field?14:34
mrichezor is it easier to convert this function field to a readonly date field?14:35
-!- rpit(~rpit@p200300C88F307400C2CDE6C91283B9CF.dip0.t-ipconnect.de) has joined #tryton14:41
pokolimrichez: order based on cast14:46
mrichezpokoli: ?14:46
pokolimrichez: something like http://hg.tryton.org/modules/party/file/ff3dd9d1efd6/party.py#l99 but using cast instead of Charlength14:46
pokolimrichez: replace code with your functional field name14:47
pokoliACTION bbl14:47
nicoeCan't you just order by this field?14:48
mrichezas field is a function field, i have to define an order method14:49
nicoeOh I thought it was a real field14:50
mricheznicoe: :-)14:51
mrichezpokoli: your example is with a real field...14:51
-!- shard__(~shard@2409:8a55:d23f:8560:dccf:96a9:94fd:60a4) has joined #tryton14:51
nicoeThen you can probably use and "order_" function that do the computation between the two real fields14:51
mricheznicoe: that was i thougt , but dont see sql date functions for ordering14:53
mrichezhere's my code: https://pastebin.com/8BnbTEeP14:53
mricheznicoe: and my ordering is based on a compute between a date and a value14:54
mrichezif this is not possible, i'll convert my function field to a real field readonly..14:57
nicoemrichez: estimated_time_delivery should be a TimeDelta, no ?14:57
nicoeBut you can use the python-sql datetime expressions14:58
nicoein your code14:58
mricheznicoe: no, a date, it is the result between a substraction of number days on a planned date14:59
mricheznicoe: result of an order method is an sql expression, no ?14:59
nicoeSomething like [table.planned_date - Now()] should work15:00
nicoeBut you should be able to use any SQL expression indeed15:01
mricheznicoe: More something like [dateadd(dd,nbdays,table.planned_date)]15:01
mrichezdon't see sql date functions in sql.operators15:02
cedkmrichez: your data layer is bad because you use integer to store a timedelta instead of timedelta15:04
cedkmrichez: if you had nbdays stored as timedelta, the computation could be done in SQL15:04
mrichezcedk: ok15:05
mrichezcedk: will convert the field in timedelta and doing compute in my order method15:06
mrichezthanks to all15:06
-!- udono1(~udono@183-058-210-188.ip-addr.inexio.net) has joined #tryton16:37
-!- udono(~udono@183-058-210-188.ip-addr.inexio.net) has joined #tryton16:41
-!- udono1(~udono@183-058-210-188.ip-addr.inexio.net) has joined #tryton16:44
-!- rpit(~rpit@p4FFB7256.dip0.t-ipconnect.de) has joined #tryton16:46
-!- udono(~udono@183-058-210-188.ip-addr.inexio.net) has joined #tryton16:47
-!- udono1(~udono@183-058-210-188.ip-addr.inexio.net) has joined #tryton16:50
-!- udono(~udono@183-058-210-188.ip-addr.inexio.net) has joined #tryton16:53
-!- gdrius(~gdrius@m90-143-121-251.cust.tele2.lt) has joined #tryton17:31
-!- thaneor1(~lenovo3@r179-24-153-172.dialup.adsl.anteldata.net.uy) has joined #tryton18:34
-!- csotelo(~csotelo@181.67.16.48) has joined #tryton20:32
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton21:01

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