IRC logs of #tryton for Thursday, 2019-03-21 #tryton log beginning Thu Mar 21 00:00:01 CET 2019
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton01:03
-!- shard_(~shard@ has joined #tryton03:03
-!- yangoon1( has joined #tryton04:03
-!- kapil____(uid36151@gateway/web/ has joined #tryton05:03
-!- springwurm(~Springwur@ has joined #tryton07:03
-!- thaneor( has joined #tryton07:03
-!- udono( has joined #tryton08:03
-!- Timitos( has joined #tryton08:03
-!- mrichez( has joined #tryton08:03
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:03
alexbodngood morning friends, pokoli, cedk10:03
-!- rpit( 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( has joined #tryton10:03
-!- nicoe( has joined #tryton10:03
-!- Springwurm_(~Springwur@ has joined #tryton10:03
-!- Springwurm_(~Springwur@ has left #tryton10:03
-!- springwurm(~Springwur@ has left #tryton10:03
-!- springwurm(~Springwur@ has joined #tryton10:03
-!- Springwurm_(~Springwur@ has joined #tryton10:03
-!- springwurm(~Springwur@ has joined #tryton10:03
-!- rpit( has joined #tryton10:03
-!- csotelo(~csotelo@ has joined #tryton11:03
-!- rpit( has joined #tryton11:03
-!- mariomop( 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.
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@ 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( has joined #tryton15:03
pokolimrichez: order based on cast15:03
mrichezpokoli: ?15:03
pokolimrichez: something like 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:
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( has joined #tryton17:03
-!- udono( has joined #tryton17:03
-!- udono1( has joined #tryton17:03
-!- rpit( has joined #tryton17:03
-!- udono( has joined #tryton17:03
-!- udono1( has joined #tryton17:03
-!- udono( has joined #tryton17:03
-!- gdrius( has joined #tryton18:03
-!- thaneor1( has joined #tryton19:03
-!- csotelo(~csotelo@ has joined #tryton21:03
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton22:03

Generated by 2.16.0 by Marius Gedminas - find it at!