IRC logs of #tryton for Monday, 2012-07-23 #tryton log beginning Mon Jul 23 00:00:01 CEST 2012
2012-07-23 07:47 -!- sharoonthomas(~sharoonth@ has left #tryton
2012-07-23 13:38 <marc0s> hi, is there any script around for migrating old translation csv files to the new .po ones? (i just wanted to ask before coding it myself)
2012-07-23 14:10 <sampac> marc0s: I don't know the old csv system but you can export .po files with the translations as they stand in the database...
2012-07-23 14:15 <cedk> marc0s: we did the migration by importing in the old system and than migrate the DB to the new one
2012-07-23 14:16 <marc0s> sampac: thanks :)
2012-07-23 14:17 <marc0s> cedk: yes, the point is that now i have no old DB with me module already installed, but i could do it that way ...
2012-07-23 14:19 <cedk> marc0s: it is easy to create one :-)
2012-07-23 14:20 <marc0s> cedk: sure :) just laziness
2012-07-23 14:58 <marc0s> i ended up with this if it's of interest to anyone
2012-07-23 15:13 <sharoonthomas> cedk: there is a possibility for zero division error in project plan module if there are allocations with zero percentage assigned
2012-07-23 15:13 <sharoonthomas> cedk:
2012-07-23 15:14 <sharoonthomas> cedk: can we consider this a bug ? and if so should the patch handle a zerodivisionerror or check if total_allocation is zero ?
2012-07-23 15:17 <bechamel> sharoonthomas: IMO the fix would be to add a constrain on the percentage field
2012-07-23 15:17 <sharoonthomas> bechamel: not letting 0% in the allocation ?
2012-07-23 15:17 <bechamel> sharoonthomas: yes
2012-07-23 15:19 <bechamel> this bug is there because when the module was written a required float meant also non-zero
2012-07-23 15:20 <bechamel> but now a required field can be zero, so the constraint must be added
2012-07-23 15:24 <cedk> bechamel, sharoonthomas: it is nicoe who forget this one during migration
2012-07-23 15:25 <bechamel> nicoe: boooh! booh! ;)
2012-07-23 15:25 <sharoonthomas> cedk: so will write a patch and send.. you will need a patch for both 2.4 and trunk ?
2012-07-23 15:28 <sharoonthomas> ACTION won't it be better to have a `min` and `max` attribute on int and float fields which would validate when saving the record
2012-07-23 15:29 <bechamel> sharoonthomas: this would make sense, but should be also implemented in the client
2012-07-23 15:29 <cedk> sharoonthomas: only trunk because it can not be backported
2012-07-23 15:29 <sharoonthomas> cedk: ok
2012-07-23 15:29 <cedk> sharoonthomas: I think it must be domain
2012-07-23 15:30 <sharoonthomas> bechamel: will it be difficult to have on client ?
2012-07-23 15:31 <cedk> I think for domain support on non-relation field should be not too difficult
2012-07-23 15:31 <sharoonthomas> cedk: an pylon already has gt, ge, lt, le
2012-07-23 15:31 <sharoonthomas> s/pylon/pyson
2012-07-23 15:34 <bechamel> the main difficulty is to have something user-friendly
2012-07-23 15:34 <cedk> bechamel: field becomes red
2012-07-23 15:38 <bechamel> cedk: you should have missed "user-friendly" in my answer :)
2012-07-23 15:44 <cedk> bechamel: no
2012-07-23 15:53 <bechamel> cedk: currently, red == missing. here we need to tell the user that the value is out of domain. This is different.
2012-07-23 15:55 <cedk> bechamel: no, red == wrong
2012-07-23 15:59 <cedk> bechamel: look at the domain inversion
2012-07-23 16:00 <bechamel> cedk: so the user must guest the correct value by himself ?
2012-07-23 16:00 <bechamel> *guess
2012-07-23 16:02 <cedk> bechamel: yes
2012-07-23 16:03 <cedk> bechamel: it is not optimal but I don't think it is possible to do better
2012-07-23 16:07 <bechamel> cedk: a simple message would be useful, like we have for the constraints
2012-07-23 16:08 <cedk> bechamel: not possible
2012-07-23 16:08 <bechamel> ACTION thinks constraint and domains are the same things and should be merged :)
2012-07-23 16:08 <cedk> bechamel: not possible
2012-07-23 16:09 <cedk> bechamel: it is possible to express a constraint as a domain but not always
2012-07-23 16:11 <bechamel> it's Possimpible ! (
2012-07-23 16:13 <bechamel> cedk: joke aside, why do you think that a custom message for domain is not possible ?
2012-07-23 16:14 <bechamel> currently we show "Invalid form" under the title, what about a dynamic string
2012-07-23 16:17 <cedk> bechamel: ok it is on impossible but will required a very much work
2012-07-23 16:17 <cedk> bechamel: because you have to make a sentence out of a domain
2012-07-23 16:18 <cedk> bechamel: or just show the domain
2012-07-23 16:25 <cedk> and the domain could be showed like in the search box
2012-07-23 16:25 <bechamel> cedk: no, the module developper must give an explicit message (just like the constraints, the framework doesn't make sentence from them)
2012-07-23 16:26 <bechamel> cedk: actually, I like the idea of "translating" the pyson domain into something "readable" by the user
2012-07-23 16:26 <cedk> bechamel: it is not possible
2012-07-23 16:28 <cedk> bechamel: I don't think you understand how domain inversion work
2012-07-23 16:30 <bechamel> cedk: I don't see why you talk about domain inversion actually
2012-07-23 16:31 <cedk> bechamel: because it define a domain for each fields
2012-07-23 18:28 <cedk> this took me half a day to fix :-(
2012-07-23 18:36 <bechamel> cedk: what should be the traceback ?
2012-07-23 18:36 <cedk> bechamel: the one from property I think
2012-07-23 18:38 <bechamel> cedk: but maybe __getattr__ is called when an AttributeError is raised, so there are no way to know which one to raise
2012-07-23 18:40 <bechamel> cedk: it is not a bug but a feature
2012-07-23 18:40 <cedk> bechamel: yes of course but I think it is wrong to call __getattr__ for a property
2012-07-23 18:40 <cedk> bechamel: that's why I mark it as behavior
2012-07-23 18:41 <bechamel> cedk: IMO it is the expected behavior :)
2012-07-23 18:46 <cedk> bechamel: we will see

Generated by 2.17.3 by Marius Gedminas - find it at!