IRC logs of #tryton for Thursday, 2012-08-16

chat.freenode.net #tryton log beginning Thu Aug 16 00:00:01 CEST 2012
2012-08-16 00:41 -!- rhubner(~rhubner@177.40.69.239) has left #tryton
2012-08-16 08:10 -!- blast_hardcheese(~blast_har@unaffiliated/blast-hardcheese/x-0199635) has left #tryton
2012-08-16 09:29 <gour> morning
2012-08-16 09:30 <gour> initial release of Neso stated: "This release is not for production use, but for developers and testers to give us feedback." is Neso today suitable for production?
2012-08-16 09:35 <cedk> gour: not really but it depends of your requirements
2012-08-16 09:38 <gour> single-user is enough for me and sqlite3 is cool, although we keep postgresql due to bacula backup
2012-08-16 10:06 <gour> ACTION has found service file and now doing 'natural' installation
2012-08-16 10:20 <gour> is tryton's docs enough to use/tweak/develop tryton or it is required to consult openerp's one?
2012-08-16 10:22 <gour> ACTION notices that archlinux's package is broken...
2012-08-16 11:11 -!- gour(~gour@93-142-197-3.adsl.net.t-com.hr) has left #tryton
2012-08-16 13:18 -!- cristatus(~amit@1.22.97.30) has left #tryton
2012-08-16 18:20 <__efx__> hello, I am writing a small script based on "Tryton as a Module" how to. I want to order subdivisions based on the country code is it possible with the search function ? I tried so far things like order=['country.code','ASC'] but I have wrong field name exception
2012-08-16 18:23 <cedk> __efx__: http://doc.tryton.org/2.4/trytond/doc/ref/models/models.html#trytond.model.ModelSQL._order
2012-08-16 18:28 <__efx__> cedk: In my script I use the serach_read of the ModelStorage how does it link to the ModelSQL ?
2012-08-16 18:29 <cedk> __efx__: it call search and read
2012-08-16 18:30 <__efx__> cedk: should I use the ModelSQL._order_name ?
2012-08-16 18:31 <cedk> __efx__: order params are the same as _order
2012-08-16 18:33 <__efx__> cedk: so the only thing that I can do is sort the subdivision on the id of the country but not on its name ?
2012-08-16 18:35 <cedk> __efx__: no, you can sort on any fields you want
2012-08-16 18:37 <cedk> __efx__: use: order=[('country.name', 'ASC')]
2012-08-16 18:37 <__efx__> I got a : *** Exception: ('Error', 'Wrong field name (country.name) for country.subdivision in order!')
2012-08-16 18:37 <__efx__> cedk: M.search_read([],fields_names=[],order=[('country.name','ASC')])
2012-08-16 18:38 <__efx__> where M is a : <class 'trytond.modules.country.country.Subdivision'>
2012-08-16 18:39 <cedk> __efx__: ho yes, you can only order on fields of the Model
2012-08-16 18:41 <__efx__> cedk: ok, thank you
2012-08-16 18:43 <cedk> __efx__: but if you order on Many2One field, it will order by the default order of this field
2012-08-16 18:44 <cedk> __efx__: but I think it will be not too difficult to improve the _order_calc to allow what you tried
2012-08-16 18:46 <__efx__> cedk: ok I will try to improve it, it is on the model/modelsql.py right ?
2012-08-16 18:46 <cedk> __efx__: yes
2012-08-16 19:03 <__efx__> cedk : ok I have a 4 line modification that seems to do the work
2012-08-16 19:03 <__efx__> cedk: thank you for pointing me to the right place
2012-08-16 19:05 <cedk> __efx__: please submit a patch
2012-08-16 19:06 <__efx__> cedk : on bugs.tryton.org ?
2012-08-16 19:06 <cedk> __efx__: yes, following the wiki page
2012-08-16 19:06 <cedk> https://code.google.com/p/tryton/wiki/HowtoContribute
2012-08-16 19:07 <cedk> __efx__: but I think your patch will require a unittest
2012-08-16 19:08 <__efx__> so I should run a unittest before submitting the patch or what ?
2012-08-16 19:09 <cedk> __efx__: yes but also you should add a unittest to test the order of search
2012-08-16 19:09 <cedk> __efx__: with simple fields, many2one with dot etc.
2012-08-16 19:11 <__efx__> cedk: ok so I should put together with the patch a script that shows that the functionality is working
2012-08-16 19:12 <cedk> __efx__: yes
2012-08-16 21:51 <__efx__> cedk: I cloned the mercurial repository made the changes on the file. Now how can I generate the patch ?

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