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 #tryton01:03
-!- shard_(~shard@223.74.176.48) has joined #tryton03:03
-!- yangoon1(~mathiasb@i59F4FE89.versanet.de) has joined #tryton04:03
-!- kapil____(uid36151@gateway/web/irccloud.com/x-vkkfgmtailwucuyy) has joined #tryton05:03
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton07:03
-!- thaneor(~lenovo3@r179-24-113-156.dialup.adsl.anteldata.net.uy) has joined #tryton07:03
-!- udono(~udono@183-058-210-188.ip-addr.inexio.net) has joined #tryton08:03
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton08:03
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton08:03
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:03
alexbodngood morning friends, pokoli, cedk10:03
-!- rpit(~rpit@p200300C88F3074009483377F147C344D.dip0.t-ipconnect.de) has joined #tryton10:03
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?10:03
-!- rpit(~rpit@p4FFB7256.dip0.t-ipconnect.de) has joined #tryton10:03
-!- nicoe(~nicoe@host-85-201-184-151.dynamic.voo.be) has joined #tryton10:03
-!- Springwurm_(~Springwur@5.104.149.54) has joined #tryton10:03
-!- Springwurm_(~Springwur@5.104.149.54) has left #tryton10:03
-!- springwurm(~Springwur@5.104.149.54) has left #tryton10:03
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton10:03
-!- Springwurm_(~Springwur@5.104.149.54) has joined #tryton10:03
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton10:03
-!- rpit(~rpit@p200300C88F307400C2CDE6C91283B9CF.dip0.t-ipconnect.de) has joined #tryton10:03
pokolialexbodn: http://hg.tryton.org/tryton-tools/file/9c47c389f87c/tryton_demo.py11:03
-!- csotelo(~csotelo@181.67.16.48) has joined #tryton11:03
-!- rpit(~rpit@p4FFB7256.dip0.t-ipconnect.de) has joined #tryton11:03
-!- mariomop(~quassel@host155.186-109-209.telecom.net.ar) has joined #tryton11:03
alexbodnthank you very very much pokoli. i see clear examples of code i've missed.12:03
alexbodnproteus is a true client. kudos12:03
pokolialexbodn: yes, it is the tryton client from commandline and mimics as much as possible the standard client12:03
pokolialexbodn: it's a very good solution for running e2e test with our code12:03
springwurmalexbodn; i think another great resources, are the test scenarios: e.g. http://hg.tryton.org/modules/sale/file/tip/tests/scenario_sale.rst12:03
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.13:03
alexbodnthe rst scenariouses are very cool too. thanks again pokoli. thanks author cedk13:03
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton14:03
mrichezhi, any tips to order a date function field which is a timedelta based on a date and a value from another field?15:03
mrichezor is it easier to convert this function field to a readonly date field?15:03
-!- rpit(~rpit@p200300C88F307400C2CDE6C91283B9CF.dip0.t-ipconnect.de) has joined #tryton15:03
pokolimrichez: order based on cast15:03
mrichezpokoli: ?15:03
pokolimrichez: something like http://hg.tryton.org/modules/party/file/ff3dd9d1efd6/party.py#l99 but using cast instead of Charlength15:03
pokolimrichez: replace code with your functional field name15:03
pokoliACTION bbl15:03
nicoeCan't you just order by this field?15:03
mrichezas field is a function field, i have to define an order method15:03
nicoeOh I thought it was a real field15:03
mricheznicoe: :-)15:03
mrichezpokoli: your example is with a real field...15:03
-!- shard__(~shard@2409:8a55:d23f:8560:dccf:96a9:94fd:60a4) has joined #tryton15:03
nicoeThen you can probably use and "order_" function that do the computation between the two real fields15:03
mricheznicoe: that was i thougt , but dont see sql date functions for ordering15:03
mrichezhere's my code: https://pastebin.com/8BnbTEeP15:03
mricheznicoe: and my ordering is based on a compute between a date and a value15:03
mrichezif this is not possible, i'll convert my function field to a real field readonly..15:03
nicoemrichez: estimated_time_delivery should be a TimeDelta, no ?15:03
nicoeBut you can use the python-sql datetime expressions15:03
nicoein your code15:03
mricheznicoe: no, a date, it is the result between a substraction of number days on a planned date15:03
mricheznicoe: result of an order method is an sql expression, no ?15:03
nicoeSomething like [table.planned_date - Now()] should work16:03
nicoeBut you should be able to use any SQL expression indeed16:03
mricheznicoe: More something like [dateadd(dd,nbdays,table.planned_date)]16:03
mrichezdon't see sql date functions in sql.operators16:03
cedkmrichez: your data layer is bad because you use integer to store a timedelta instead of timedelta16:03
cedkmrichez: if you had nbdays stored as timedelta, the computation could be done in SQL16:03
mrichezcedk: ok16:03
mrichezcedk: will convert the field in timedelta and doing compute in my order method16:03
mrichezthanks to all16:03
-!- udono1(~udono@183-058-210-188.ip-addr.inexio.net) has joined #tryton17:03
-!- udono(~udono@183-058-210-188.ip-addr.inexio.net) has joined #tryton17:03
-!- udono1(~udono@183-058-210-188.ip-addr.inexio.net) has joined #tryton17:03
-!- rpit(~rpit@p4FFB7256.dip0.t-ipconnect.de) has joined #tryton17:03
-!- udono(~udono@183-058-210-188.ip-addr.inexio.net) has joined #tryton17:03
-!- udono1(~udono@183-058-210-188.ip-addr.inexio.net) has joined #tryton17:03
-!- udono(~udono@183-058-210-188.ip-addr.inexio.net) has joined #tryton17:03
-!- gdrius(~gdrius@m90-143-121-251.cust.tele2.lt) has joined #tryton18:03
-!- thaneor1(~lenovo3@r179-24-153-172.dialup.adsl.anteldata.net.uy) has joined #tryton19:03
-!- csotelo(~csotelo@181.67.16.48) has joined #tryton21:03
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton22:03

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