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

chat.freenode.net #tryton log beginning Wed Jul 3 00:00:02 CEST 2013
jeancavalloAnyone knows about an exemple of a searcher which needs to join on a Reference field's field ?09:14
iamnoobhi 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' ,11:07
cedkiamnoob: http://genshi.edgewall.org/wiki/Documentation/0.6.x/xml-templates.html#id111:12
iamnoobcedk: thanks , is there an official module that uses this also in a report? ty again11:35
cedkiamnoob: I think the invoice.odt use it11:39
guillem_cedk: hi, what do you think about this proposal? https://bugs.tryton.org/issue328413:02
cedkguillem_: I don't see the usage13:07
cedkguillem_: also why are you always refering to a closed review?13:10
sharoonthomasresteve: ping13:11
guillem_because I copied bad the review ID :-/13:11
guillem_I change it now, but I'm refering to "my" review: 963003 sorry13:11
cedkguillem_: first I prefer to have separate review per functionality13:12
cedkguillem_: so don't put all in one review, it is the best way to have nothing included13:12
sharoonthomasresteve: 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 it13:12
sharoonthomasresteve: 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 code13:13
restevesharoonthomas: url_locale field is flexilbe: Add locale you like. Example: ca, ca_ES or ca-es13:13
sharoonthomasresteve: where tryton does not follow IETF BCP is it uses _ (underscore) to separate the parts instead of -13:13
resteveIf get code field, it's not flexible: ever is xx_XX13:14
sharoonthomasresteve: 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 changes13:14
resteveNever I see or get information about SEO url with xx_XX13:15
restevehttp://www.slideshare.net/anilopez/seo-for-multilanguage-international-projects slide 19 and 2113:16
sharoonthomasresteve: the language is not for SEO, on the contrary it just switches the context in the language13: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 implementation13:16
resteveLanguage is a param in url13:16
resteveURL rules you add language.13:16
sharoonthomasresteve: if you want to use 'ca' alone in the url, then your language should also be just 'ca'13:16
sharoonthomasresteve: does that not work for you ?13:16
cedkguillem_: I like the Mixin because it can be reuse13:17
resteveWork, of course, but need to duplicate a new row in ir.lang. Tryton not like to duplicate info :D13:17
sharoonthomasresteve: i got the issue13:18
resteveAnd a language have to differents urls13:18
cedksharoonthomas: maybe a matching function between URL language code and Tryton code should be added13:18
sharoonthomascedk: exactly what i thought13:18
sharoonthomasresteve: how would you expect the URLs to appear ?13:18
cedksharoonthomas: Tryton code is technical so user would want to not expose it13:18
sharoonthomasresteve: like domain.com/en/path and domain.com/ca/path ?13:19
resteveyes13:19
resteve1. lower13:19
sharoonthomascedk: the issue is how to be multilingual13:19
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 uses13:20
resteve2. Not "_" character. Better "-" character.13:20
cedkguillem_: don't like such consideration13:20
resteveExamples: http://www.tryton.org/ca/ - http://www.tryton.org/es/ - http://www.tryton.org/de/13:21
cedkguillem_: if there is a change in products_by_location, there will be many chances that it also impact lots13:21
resteveThanks nikola :D13:21
cedksharoonthomas: I guess it should be possible with URL path but also with params13:21
sharoonthomasresteve: got it. and i understand the need for what you are saying13:22
sharoonthomascedk: params are bad for SEO and caches (fronted) don't handle it well13:22
guillem_cedk: the "change" argument was not the best, but the simple to work with lots?13:22
cedksharoonthomas: strange google use it13: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 locations13:23
sharoonthomascedk: i am assuming google does not need seo :D13:23
restevesharroonthomas, cedk: Yes, params is bat when use ?lang=xx. More better param in url: domain.com/locale/new13:23
sharoonthomasACTION is thinking of the best way to handle this13:24
restevesharronthomas: 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 field13:24
restevesharroonthomas; Maybe, better not required field. I'm removing it.13:25
cedkguillem_: yes so products_by_location do the job13:26
guillem_cedk: yes!! I don't want to rewrite the SQL :-P13:27
guillem_cedk: only a "wrapper"13:27
sharoonthomasresteve: i feel we will have to go with what cedk suggested. A map between locale code and ir.language13: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)13:27
cedkguillem_: if it is to convert the dict key into nested dict, you can just write a decorator, it has nothing linked to lots13:28
sharoonthomasresteve: 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 dates13: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 review13:28
sharoonthomascedk: why do we not use babel in tryton for formatting dates and numbers for locales ? any specific reason it was implemented on our own ?13:29
restevesharoonthomas: 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?13:29
guillem_cedk: not only, it take the 'lots' parameter and treat it to call 'products_by_location'13:29
sharoonthomasresteve: it won't be hardcoded, i think it should be a new model: nereid.website.locale13:29
sharoonthomasresteve: in addition to mapping ir.language, in commerce projects it can be used for mapping currency to the locale too13:30
cedksharoonthomas: babel will not work with ir_translation13:30
cedkguillem_: so you would like to customize the where clause in products_by_location13:31
restevesharronthomas: Ah! Yes, also nice solution, but i think in ir.lang is good (and split nereid code currency file to  lang file)13:31
cedkguillem_: I guess it sounds reasonable13:31
sharoonthomasresteve: for example you might  want domain.com/ca to show prices in currency EUR, while domain.com/en to show in GBP13:31
sharoonthomasresteve: yeh, I agree13:32
sharoonthomasresteve: thinking if there could be any drawbacks on that13:32
guillem_cedk: yes, but now it could be done filtering the results and we need this ASAP13:32
cedksharoonthomas: +1 the locale of website is not only about language13:32
resteveCurrency related lang is in ir.lang = locale url  in ir.lang.13:33
guillem_cedk: I heard that you want migrate to python-sql so, better to wait after this change13:33
cedkguillem_: yes but we will not include such solution in Tryton because it'll have bad performence13:33
sharoonthomascedk: currently we extend ir.language to handle the currency, so you think a new model nereid.website.locale is better ?13:33
cedkguillem_: yes I started the patch13:33
cedkguillem_: hope to have it for the end of the month13:34
cedksharoonthomas: yes because you could have many kind of combinations13:34
cedksharoonthomas: for example you could want to have only 1 english translation but has USD and Pound13: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)13:35
cedkguillem_: ok13:36
sharoonthomascedk: agree13:36
sharoonthomasresteve: cede: let me create an issue for it13:36
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)13:37
cedkguillem_: I will not change behavior directly in the patch13:38
cedkguillem_: this should be done on a separate changeset13:38
restevesharoonthomas: I have translations babel es_ES and ca_ES (or ca and es). I'm waiting to publish....13:38
guillem_cedk: we will talk then13:41
sharoonthomasresteve: super cool. did you extract translations and update the catalog ?13:44
restevesharoonthomas: About trytond-nereid module (tryton and babel translations).13:45
resteveand add doc about translations (and template flask)13:45
sharoonthomasresteve: cool, please send PR13:55
sharoonthomasresteve: i mean pull request13:55
sharoonthomasresteve: cedk: I have created a new issue on github explaining the problem and the proposed solution: https://github.com/openlabs/nereid/issues/6514:15
shalabhaggarwalsharoonthomas: 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 o2m14:31
cedkshalabhaggarwal: +114:33
sharoonthomascedk: shalabhaggarwal: thanks, updated the issue14:35
restevesharoonthomas: Where are templates emails registration and reset and nereid? Do you have some examples?14:36
sharoonthomasresteve: 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 templates14:37
sharoonthomasresteve: let me find an example template for the registration and reset emails14:38
sharoonthomasresteve: https://gist.github.com/sorryopenerp/591755614:41
sharoonthomasresteve: ooops14:41
sharoonthomasresteve: wrong github account :P14:41
sharoonthomasresteve: https://gist.github.com/sharoonthomas/591756314:42
restevesharoonthomas: I'm agree about nereid issue65. I'm waiting some days and work in locale14:43
restevesharoonthomas: Thanks about templates #sorryopenerp14:44
resteveThis templates need to translate :P14:45
sharoonthomasresteve: yep, i think we will write some of these templates and a base template based on bootstrap into core nereid14:53
sharoonthomasresteve: 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)14:53
restevesharoonthomas: I'm learning nereid to work a little APP and basic features. And use bootstrap CSS. When finish, comments are welcomen.14:59
sharoonthomasresteve: sure, happy to help and feel free to ask any questions… also what do you think of a nereid ecommerce sprint at the unconference ?15:01
restevesharoonthomas: In this moment, I'm working a APP Tryton and nereid. It's not a ecommerce tool b2c or b2b. Next project ;)15:21
resteveI talk next TUC (Catalonia) nereid to catalan people (nan, btatic and zikzakmedia)15:22
-!- shalabhaggarwal(~shalabhag@122.177.192.193) has left #tryton16:37
meanmicioHi 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.gz16:43
meanmicioThis will be great to download the latest revision16:44
cedkmeanmicio: already answered on ML16:44
meanmiciocedk : Ok, there was some issue yesterday with the mail. Thanks16:45

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!