IRC logs of #tryton for Wednesday, 2013-07-03

chat.freenode.net #tryton log beginning Wed Jul 3 00:00:02 CEST 2013
2013-07-03 09:14 <jeancavallo> Anyone knows about an exemple of a searcher which needs to join on a Reference field's field ?
2013-07-03 11:07 <iamnoob> hi good day, does anyone know how to make an 'if statement' inside the reports file? and if it is possible.. i only know how to use a 'for x in object' ,
2013-07-03 11:12 <cedk> iamnoob: http://genshi.edgewall.org/wiki/Documentation/0.6.x/xml-templates.html#id1
2013-07-03 11:35 <iamnoob> cedk: thanks , is there an official module that uses this also in a report? ty again
2013-07-03 11:39 <cedk> iamnoob: I think the invoice.odt use it
2013-07-03 13:02 <guillem_> cedk: hi, what do you think about this proposal? https://bugs.tryton.org/issue3284
2013-07-03 13:07 <cedk> guillem_: I don't see the usage
2013-07-03 13:10 <cedk> guillem_: also why are you always refering to a closed review?
2013-07-03 13:11 <sharoonthomas> resteve: ping
2013-07-03 13:11 <guillem_> because I copied bad the review ID :-/
2013-07-03 13:11 <guillem_> I change it now, but I'm refering to "my" review: 963003 sorry
2013-07-03 13:12 <cedk> guillem_: first I prefer to have separate review per functionality
2013-07-03 13:12 <cedk> guillem_: so don't put all in one review, it is the best way to have nothing included
2013-07-03 13:12 <sharoonthomas> resteve: talking about https://github.com/openlabs/nereid/issues/63 nereid just takes the argument which comes in the language part of the URL and loads it
2013-07-03 13:13 <sharoonthomas> resteve: so it does not matter what code you are using there, but tryton follows IETF best practice of 2 char language code + 2 char country code
2013-07-03 13:13 <resteve> sharoonthomas: url_locale field is flexilbe: Add locale you like. Example: ca, ca_ES or ca-es
2013-07-03 13:13 <sharoonthomas> resteve: where tryton does not follow IETF BCP is it uses _ (underscore) to separate the parts instead of -
2013-07-03 13:14 <resteve> If get code field, it's not flexible: ever is xx_XX
2013-07-03 13:14 <sharoonthomas> resteve: so if you have a language with the code just ca (to handle all catalan irrespective of the country) it will work just as you expect without any changes
2013-07-03 13:15 <resteve> Never I see or get information about SEO url with xx_XX
2013-07-03 13:16 <resteve> http://www.slideshare.net/anilopez/seo-for-multilanguage-international-projects slide 19 and 21
2013-07-03 13:16 <sharoonthomas> resteve: the language is not for SEO, on the contrary it just switches the context in the language
2013-07-03 13:16 <guillem_> cedk: if you like the proposal, maybe (not necessary) it changes the implementation of quantity in Lot, using directly lots_by_location and avoiding the Mixin implementation
2013-07-03 13:16 <resteve> Language is a param in url
2013-07-03 13:16 <resteve> URL rules you add language.
2013-07-03 13:16 <sharoonthomas> resteve: if you want to use 'ca' alone in the url, then your language should also be just 'ca'
2013-07-03 13:16 <sharoonthomas> resteve: does that not work for you ?
2013-07-03 13:17 <cedk> guillem_: I like the Mixin because it can be reuse
2013-07-03 13:17 <resteve> Work, of course, but need to duplicate a new row in ir.lang. Tryton not like to duplicate info :D
2013-07-03 13:18 <sharoonthomas> resteve: i got the issue
2013-07-03 13:18 <resteve> And a language have to differents urls
2013-07-03 13:18 <cedk> sharoonthomas: maybe a matching function between URL language code and Tryton code should be added
2013-07-03 13:18 <sharoonthomas> cedk: exactly what i thought
2013-07-03 13:18 <sharoonthomas> resteve: how would you expect the URLs to appear ?
2013-07-03 13:18 <cedk> sharoonthomas: Tryton code is technical so user would want to not expose it
2013-07-03 13:19 <sharoonthomas> resteve: like domain.com/en/path and domain.com/ca/path ?
2013-07-03 13:19 <resteve> yes
2013-07-03 13:19 <resteve> 1. lower
2013-07-03 13:19 <sharoonthomas> cedk: the issue is how to be multilingual
2013-07-03 13:20 <guillem_> cedk: ok, I mantain the 'quantity' fields implementation. But do you like 'lots_by_location' function in Lot? it's useful because it give an interface specific for lots and, if products_by_location change it doesn't affect all Lots uses
2013-07-03 13:20 <resteve> 2. Not "_" character. Better "-" character.
2013-07-03 13:20 <cedk> guillem_: don't like such consideration
2013-07-03 13:21 <resteve> Examples: http://www.tryton.org/ca/ - http://www.tryton.org/es/ - http://www.tryton.org/de/
2013-07-03 13:21 <cedk> guillem_: if there is a change in products_by_location, there will be many chances that it also impact lots
2013-07-03 13:21 <resteve> Thanks nikola :D
2013-07-03 13:21 <cedk> sharoonthomas: I guess it should be possible with URL path but also with params
2013-07-03 13:22 <sharoonthomas> resteve: got it. and i understand the need for what you are saying
2013-07-03 13:22 <sharoonthomas> cedk: params are bad for SEO and caches (fronted) don't handle it well
2013-07-03 13:22 <guillem_> cedk: the "change" argument was not the best, but the simple to work with lots?
2013-07-03 13:23 <cedk> sharoonthomas: strange google use it
2013-07-03 13:23 <guillem_> cedk: what we need in several places (and we are starting) is to get the locations where some lots are, or what lots are in some locations
2013-07-03 13:23 <sharoonthomas> cedk: i am assuming google does not need seo :D
2013-07-03 13:23 <resteve> sharroonthomas, cedk: Yes, params is bat when use ?lang=xx. More better param in url: domain.com/locale/new
2013-07-03 13:24 <sharoonthomas> ACTION is thinking of the best way to handle this
2013-07-03 13:24 <resteve> sharronthomas: I tried slide code lang but I don't like it, because in some case, you like to custom value. More better a new char field
2013-07-03 13:25 <resteve> sharroonthomas; Maybe, better not required field. I'm removing it.
2013-07-03 13:26 <cedk> guillem_: yes so products_by_location do the job
2013-07-03 13:27 <guillem_> cedk: yes!! I don't want to rewrite the SQL :-P
2013-07-03 13:27 <guillem_> cedk: only a "wrapper"
2013-07-03 13:27 <sharoonthomas> resteve: i feel we will have to go with what cedk suggested. A map between locale code and ir.language
2013-07-03 13:27 <guillem_> cedk: I talked about change in 'products_by_location' because I think we will need to filter which lots are returned in query level (we have the use case of one product with lot of Lots)
2013-07-03 13:28 <cedk> guillem_: if it is to convert the dict key into nested dict, you can just write a decorator, it has nothing linked to lots
2013-07-03 13:28 <sharoonthomas> resteve: so, the locale code can be anything (or nothing where it fallback to a default) and from the locale code it identifies the ir.language to use in the context and for formatting dates
2013-07-03 13:28 <guillem_> cedk: I think a solution using context or another using new optional parameter for 'products_by_location' as 'grouping_filter'. but I prefer discus it after close current code review
2013-07-03 13:29 <sharoonthomas> cedk: why do we not use babel in tryton for formatting dates and numbers for locales ? any specific reason it was implemented on our own ?
2013-07-03 13:29 <resteve> sharoonthomas: Ok. we waiting,... but if we add a map between locale code, it's "hardcode". Not more better a new char field in ir.lang?
2013-07-03 13:29 <guillem_> cedk: not only, it take the 'lots' parameter and treat it to call 'products_by_location'
2013-07-03 13:29 <sharoonthomas> resteve: it won't be hardcoded, i think it should be a new model: nereid.website.locale
2013-07-03 13:30 <sharoonthomas> resteve: in addition to mapping ir.language, in commerce projects it can be used for mapping currency to the locale too
2013-07-03 13:30 <cedk> sharoonthomas: babel will not work with ir_translation
2013-07-03 13:31 <cedk> guillem_: so you would like to customize the where clause in products_by_location
2013-07-03 13:31 <resteve> sharronthomas: Ah! Yes, also nice solution, but i think in ir.lang is good (and split nereid code currency file to lang file)
2013-07-03 13:31 <cedk> guillem_: I guess it sounds reasonable
2013-07-03 13:31 <sharoonthomas> resteve: for example you might want domain.com/ca to show prices in currency EUR, while domain.com/en to show in GBP
2013-07-03 13:32 <sharoonthomas> resteve: yeh, I agree
2013-07-03 13:32 <sharoonthomas> resteve: thinking if there could be any drawbacks on that
2013-07-03 13:32 <guillem_> cedk: yes, but now it could be done filtering the results and we need this ASAP
2013-07-03 13:32 <cedk> sharoonthomas: +1 the locale of website is not only about language
2013-07-03 13:33 <resteve> Currency related lang is in ir.lang = locale url in ir.lang.
2013-07-03 13:33 <guillem_> cedk: I heard that you want migrate to python-sql so, better to wait after this change
2013-07-03 13:33 <cedk> guillem_: yes but we will not include such solution in Tryton because it'll have bad performence
2013-07-03 13:33 <sharoonthomas> cedk: currently we extend ir.language to handle the currency, so you think a new model nereid.website.locale is better ?
2013-07-03 13:33 <cedk> guillem_: yes I started the patch
2013-07-03 13:34 <cedk> guillem_: hope to have it for the end of the month
2013-07-03 13:34 <cedk> sharoonthomas: yes because you could have many kind of combinations
2013-07-03 13:35 <cedk> sharoonthomas: for example you could want to have only 1 english translation but has USD and Pound
2013-07-03 13:35 <guillem_> cedk: ok, I will do the next: i finish the 'quantity' fields implementing your comments (I put some questions in the code review) and I don't implement there the 'lots_by_location()' function (i will implement it in my module, to be replaced after)
2013-07-03 13:36 <cedk> guillem_: ok
2013-07-03 13:36 <sharoonthomas> cedk: agree
2013-07-03 13:36 <sharoonthomas> resteve: cede: let me create an issue for it
2013-07-03 13:37 <guillem_> cedk: when python-sql patch come, talk about lots_by_location() in the core. If you rewrite 'products_by_location()' to adapt it to python-sql, thik (please ;-P) to add some hook or something to could filter by lots (or more generic)
2013-07-03 13:38 <cedk> guillem_: I will not change behavior directly in the patch
2013-07-03 13:38 <cedk> guillem_: this should be done on a separate changeset
2013-07-03 13:38 <resteve> sharoonthomas: I have translations babel es_ES and ca_ES (or ca and es). I'm waiting to publish....
2013-07-03 13:41 <guillem_> cedk: we will talk then
2013-07-03 13:44 <sharoonthomas> resteve: super cool. did you extract translations and update the catalog ?
2013-07-03 13:45 <resteve> sharoonthomas: About trytond-nereid module (tryton and babel translations).
2013-07-03 13:45 <resteve> and add doc about translations (and template flask)
2013-07-03 13:55 <sharoonthomas> resteve: cool, please send PR
2013-07-03 13:55 <sharoonthomas> resteve: i mean pull request
2013-07-03 14:15 <sharoonthomas> resteve: cedk: I have created a new issue on github explaining the problem and the proposed solution: https://github.com/openlabs/nereid/issues/65
2013-07-03 14:31 <shalabhaggarwal> sharoonthomas: I saw the design put up on the above issue. I feel the relation between website and locales should be a m2m rather than a o2m
2013-07-03 14:33 <cedk> shalabhaggarwal: +1
2013-07-03 14:35 <sharoonthomas> cedk: shalabhaggarwal: thanks, updated the issue
2013-07-03 14:36 <resteve> sharoonthomas: Where are templates emails registration and reset and nereid? Do you have some examples?
2013-07-03 14:37 <sharoonthomas> resteve: from the next version we will be bundling templates for such things with nereid because we now have a template loader which looks at the module graph for tryton and loads the templates
2013-07-03 14:38 <sharoonthomas> resteve: let me find an example template for the registration and reset emails
2013-07-03 14:41 <sharoonthomas> resteve: https://gist.github.com/sorryopenerp/5917556
2013-07-03 14:41 <sharoonthomas> resteve: ooops
2013-07-03 14:41 <sharoonthomas> resteve: wrong github account :P
2013-07-03 14:42 <sharoonthomas> resteve: https://gist.github.com/sharoonthomas/5917563
2013-07-03 14:43 <resteve> sharoonthomas: I'm agree about nereid issue65. I'm waiting some days and work in locale
2013-07-03 14:44 <resteve> sharoonthomas: Thanks about templates #sorryopenerp
2013-07-03 14:45 <resteve> This templates need to translate :P
2013-07-03 14:53 <sharoonthomas> resteve: yep, i think we will write some of these templates and a base template based on bootstrap into core nereid
2013-07-03 14:53 <sharoonthomas> resteve: unlike other general purpose framework i feel we can make some opinionated choices because modules like nereid cart clearly define what it is going to be used for (a shopping cart)
2013-07-03 14:59 <resteve> sharoonthomas: I'm learning nereid to work a little APP and basic features. And use bootstrap CSS. When finish, comments are welcomen.
2013-07-03 15:01 <sharoonthomas> resteve: sure, happy to help and feel free to ask any questions… also what do you think of a nereid ecommerce sprint at the unconference ?
2013-07-03 15:21 <resteve> sharoonthomas: In this moment, I'm working a APP Tryton and nereid. It's not a ecommerce tool b2c or b2b. Next project ;)
2013-07-03 15:22 <resteve> I talk next TUC (Catalonia) nereid to catalan people (nan, btatic and zikzakmedia)
2013-07-03 16:37 -!- shalabhaggarwal(~shalabhag@122.177.192.193) has left #tryton
2013-07-03 16:43 <meanmicio> Hi there ! We should have a sym link to the latest stable module / component. For example trytond_account-latest.tar.gz would point to trytond_account-2.8.1.tar.gz
2013-07-03 16:44 <meanmicio> This will be great to download the latest revision
2013-07-03 16:44 <cedk> meanmicio: already answered on ML
2013-07-03 16:45 <meanmicio> cedk : Ok, there was some issue yesterday with the mail. Thanks

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