IRC logs of #tryton for Wednesday, 2014-07-23 #tryton log beginning Wed Jul 23 00:00:01 CEST 2014
-!- udono( has joined #tryton00:28
-!- udono1( has joined #tryton01:30
-!- sharkcz( has joined #tryton03:32
-!- sharoonthomas(~sharoonth@ has joined #tryton03:48
-!- digitalsatori(~Thunderbi@ has joined #tryton04:11
-!- digitalsatori(~Thunderbi@ has joined #tryton05:08
-!- vak0160(~vak0160@ has joined #tryton05:08
-!- bechamel( has joined #tryton06:05
-!- prksh(~prksh@ has joined #tryton06:34
-!- frispete_( has joined #tryton06:40
-!- mar( has joined #tryton06:50
-!- yangoon1( has joined #tryton07:01
-!- vak0160(~vak0160@ has joined #tryton07:02
-!- bechamel( has joined #tryton07:22
-!- LordVan(~LordVan@gentoo/developer/LordVan) has joined #tryton07:29
marhow do I update default value of property?07:33
-!- corro(~corro@ has joined #tryton08:16
-!- zultron( has joined #tryton08:21
-!- zultron( has joined #tryton08:22
-!- zultron( has joined #tryton08:23
-!- vcardon( has joined #tryton09:09
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:10
-!- bechamel( has joined #tryton09:11
-!- jeancavallo( has joined #tryton09:35
-!- grasbauer( has joined #tryton09:50
marhow do I update default value of property?09:54
-!- pobsteta(~Thunderbi@ has joined #tryton09:56
pokolimar: not sure to understand you, default value for a field?09:57
pokolimar: or default value of a property, for example the revenue account of a product09:57
mardefault cost_price_method when creating new product.template09:58
-!- nicoe( has joined #tryton09:58
marcost_price_method is Property(Selection)09:58
marI override default_cost*() method, but default value doesn't change09:59
marand I see that there's Administration -> Models -> Default Properties, but I can't change it there10:00
marI can't = I save it, but after refresh old value is present10:01
-!- jeancavallo( has joined #tryton10:08
-!- open_sax( has joined #tryton10:13
pokolimar: which cost_method do you have on the product?10:17
marI have 'fixed' now10:18
marI want it to be 'fifo'10:18
marby default ;)10:19
pokolimar: just override the default10:19
pokolimar: so If you have fixed, i don't understand whats happening there10:20
marI override it using default_* method to 'fifo'10:20
marbut defaults_get call still returns 'fixed'10:21
mar(not sure about name defaults_get)10:21
cedkmar: cost_price_method is not a property managed by the default property as it has a default method10:21
cedkmar: probably it should be changed for a value defined on a product configuration object10:21
-!- prksh(~prksh@ has joined #tryton10:22
marand I see that it fetches default value from with res=NULL10:22
-!- littlebit( has joined #tryton10:26
marwhat's proper way of overriding it?10:27
cedkmar: oh yes, it seems that all property field default value are overriden by the default property10:31
cedkmar: and there is a default property defined in product.xml10:32
cedkmar: so you must change this value10:32
-!- prksh(~prksh@ has joined #tryton10:32
marso I create another module with same entry, but different value?10:32
marif I do so, I have 2 values then in Default Properties for the same model ;)10:33
cedkmar: no you must edit the record10:42
cedkmar: but I just test it and it seems the reference widget doesn't work any more for simple values10:43
cedkmar: Property field is one more shit we have to kill from OpenERP10:45
-!- littlebit( has joined #tryton10:46
marwhat if I just override default_get method10:47
marand return 'fifo' there?10:47
cedkmar: the right way is to change the default property10:48
marwhat do you mean change default property?10:48
marchange value in db?10:48
marand forget about it?10:48
cedkmar: change in the DB10:49
marthere's still one thing that makes me nervous10:49
mardoes this mean that it doesn't set values for values that matches defaults?10:51
cedkmar: yes10:51
marso if I change the default, I have to force_set values of old default for entries that doesn't have one?10:51
cedkmar: yes as I said Property field is shit10:53
marwhat about "workaround" way of just overriding default_get?10:53
marwould it work/10:53
marbecause it seems like a lot of work for such small thing10:54
cedkmar: I already answered: update the database10:57
marok thanks10:58
-!- pobsteta(~Thunderbi@ has joined #tryton11:08
-!- open_sax( has left #tryton11:28
-!- digitalsatori(~Thunderbi@ has joined #tryton11:56
-!- ronaldm(~ronaldm@ has joined #tryton12:29
-!- udono( has joined #tryton12:37
-!- bechamel( has joined #tryton13:44
-!- kstenger(~karla@ has joined #tryton13:45
-!- umangarora(765bb5fa@gateway/web/freenode/ip. has joined #tryton14:03
umangarorapokoli: i have sent a pull request to tryton documentation which fixes all the warnings and errors because of rst syntax violations14:06
-!- smarro(~sebastian@ has joined #tryton14:18
-!- pobsteta(~Thunderbi@ has joined #tryton14:31
-!- marius_( has joined #tryton14:51
-!- smarro(~sebastian@ has joined #tryton15:06
-!- ronaldm(~ronaldm@ has joined #tryton15:36
-!- alisonken1home( has joined #tryton15:40
-!- gremly(~gremly@ has joined #tryton15:54
-!- hiaselhans(~Thunderbi@ has joined #tryton15:58
-!- smarro_(~sebastian@ has joined #tryton16:00
-!- ronaldm(~ronaldm@ has joined #tryton16:41
hiaselhanspokoli: my pr for docs doesnt rebase correctly anymore, is it ok if i close this one and put another one with recent changes applied? also i corrected intersphinx mapping for modules in the meantime...16:44
pokolihiaselhans: just merge/rebase master in your branch and push the pull request another time16:45
pokolihiaselhans: i've merged some work that fixes rst warnings16:45
hiaselhanspokoli: ive seen, cool! i just put those changes manually as all that content moved to a different file...16:46
pokolihiaselhans: thanks16:47
hiaselhanspokoli: almost done, one more thing: do you think its necessary to put "TRYTOND_HOME/trytond/bin/trytond" for the command lines to update/insert modules or could i replace by simple "trytond"16:53
pokolihiaselhans: it depends on the section you are16:54
hiaselhanspokoli: ok i simply leave it, just thought its easier to read as simple "trytond"16:55
-!- meanmicio( has joined #tryton16:55
-!- meanmicio(~meanmicio@fsf/member/meanmicio) has joined #tryton16:55
pokolihiaselhans: but in the developer section is normal to use trytond/bin/trytond because you don't have de server installed, so it's not available as trytond17:00
hiaselhanspokoli: i left it as is... just thought we were enforcing virtualenv anyhow.. :)17:02
hiaselhanspokoli: (pushed as #55)17:02
pokolihiaselhans: I will review when possible17:02
pokolihiaselhans: we are just adding some travis-ci integration in order to test if build is ok and doesn't produce warnings17:03
hiaselhanspokoli: thanks! (wow, we have travis... :)17:03
cedkyangoon1: did you ever try to create a docker image base on debian packages?17:05
-!- sharoonthomas(~sharoonth@ has joined #tryton17:07
sharoonthomaspokoli: the build has passed, do you want to merge ?
-!- ronaldm(~ronaldm@ has joined #tryton17:08
pokolisharoonthomas: thanks for the honor! Merged!17:08
sharoonthomaspokoli: thanks17:09
pokolisharoonthomas: we should ensure no commit comes with warning, shouldn't we?17:09
sharoonthomaspokoli: the pull request will show you if there are warnings17:10
sharoonthomaspokoli: so we can ask the user to fix17:10
pokolisharoonthomas: perfect. I will try to add some notes about it on README17:10
sharoonthomaspokoli: sure and you could also add a badge: .. image::
sharoonthomas    :target:
pokolisharoonthomas: can we see the rendered version on travis?17:14
sharoonthomaspokoli: you mean the built/rendered HTML ?17:14
pokolisharoonthomas: yes17:14
pokolisharoonthomas: I use the preview button, but sometimes i download and make the PR to be able to see if all references and links are OK17:15
pokolisharoonthomas: so If it is available on travis, i don't have to download and build17:15
pokoliACTION is very lazy17:15
sharoonthomaspokoli: loll, let me try that.17:16
pokolisharoonthomas: if possible, never mind if it's not possible :P17:16
sharoonthomaspokoli: its an interesting thing to do... we have a website built that way but uploads the contents to s3 from travis17:17
pokolisharoonthomas: If you can make it work with an ssh access, i can provide a server :P17:18
cedksharoonthomas: I saw you created a docker for trytond17:20
cedksharoonthomas: but why are you using pip instead of apt-get?17:20
pokolisharoonthomas: we can use this
pokolisharoonthomas: sorry, wrong link. This
sharoonthomascedk: are apt (deb) packages released at the same time and frequency of tryton releases (including minor ones) ? (just asking.. since we usually don't use apt)17:22
sharoonthomaspokoli: thinking of using docker if you already have a server (with a public ip)17:22
sharoonthomaspokoli: we can have github send HTML post to the server when there is a new PR and we could then build that on a new docker container and update the PR with the link to the built documentation17:23
sharoonthomaspokoli: something like that annoying bot nicoe built for code review ;)17:24
pokolisharoonthomas: I have the server (with public ip), no docker installed (but I can install) so yes17:24
pokolisharoonthomas: I think that will be enought17:24
cedksharoonthomas: yangoon1 manage that pretty fast17:25
cedksharoonthomas: but I don't know for Ubuntu17:25
sharoonthomascedk: then we should depend on that17:25
-!- ronaldm(~ronaldm@ has joined #tryton17:33
pokolisharoonthomas: I was thinking about forgeting on docker, and make a flask-app that builds the docs17:36
pokolisharoonthomas: so where can I find an example of the POST request?17:36
sharoonthomaspokoli: sending you17:39
sharoonthomaspokoli: meantime, i will try something too17:39
-!- alisonken1lap3( has joined #tryton17:40
-!- hiaselhans(~Thunderbi@ has joined #tryton17:44
pokolisharoonthomas: thinkg about building once travis have pass the build, otherwise I will get failing builds17:47
sharoonthomaspokoli: yes17:48
pokolisharoonthomas: so maybe using this
sharoonthomaspokoli: sounds like a plan17:50
-!- grasbauer( has joined #tryton17:55
pokolisharoonthomas: it seems not so much complicated, I will try it in some time17:55
sharoonthomaspokoli: whatever you do, if documented will be a good read for a blog17:56
sharoonthomaspokoli: I will try a docker version of it though17:56
pokolisharoonthomas: It's a pity that i didn't blog in english (maybe it can be an exception)17:57
pokolisharoonthomas: ok, so with docker it will be a good read for a blog too :P17:57
sharoonthomaspokoli: i'm trying ;)17:58
-!- digitalsatori(~Thunderbi@ has joined #tryton18:08
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton18:13
-!- seba_( has joined #tryton18:18
-!- jvblasco_( has joined #tryton18:19
jvblasco_guys, any tool, documentation or wahtever, to make a tryton database migration smoother?18:20
pokolijvblasco: trytond -d <database> -u all is not smooth?18:20
jvblasco_pokoli: well, some models change, i refactored a huge amount of code18:21
jvblasco_pokoli: but i don't want to make my lusers type the info again18:21
pokolijvblasco: so kill your lusers :P18:21
pokolijvblasco_: jokes a part, just write a __register__ method that runs the needed sql queries18:22
jvblasco_pokoli: hehehehehe, i wish i could, u can't live with them, but neither without them...18:22
pokolijvblasco_: I don't know any docs on how to write them, I always get an example from existing ones18:22
-!- grasbauer( has joined #tryton18:23
jvblasco_pokoli: is that what tryton uses to make updates?18:23
jvblasco_pokoli: anyway, changes are hard enough that i think i'll write a simple etl18:24
pokolijvblasco_: if you can do it with an sql query is not hard18:24
jvblasco_pokoli: i would need to create tables, redo relations etc...18:25
jvblasco_pokoli: my SQL skill is not that high, i usually rely on the orm layer for that18:25
pokolijvblasco_: table structure is managed by tryton by default, you just need to update the data18:26
pokolijvblasco_: just SELECT INSERT to migrate data from tables18:26
jvblasco_pokoli: oO, is that true?18:26
pokolijvblasco_: you don't belive me?18:27
jvblasco_pokoli: u know i do, it just seems magical ^^18:27
jvblasco_pokoli: tryton doesn't stop surprising me18:27
pokolijvblasco_: as magical as table creation, that is also managed by tryton18:27
jvblasco_pokoli: yeah, but if i create a table, only add the pk, does tryton handle to apply fk for the relations?18:28
hiaselhansis there a sample file to use for new modules or do you just use one from existing modules?18:30
pokolijvblasco_: don't understand18:30
pokolihiaselhans: for contrib modules
jvblasco_hiaselhans: i used one from existing modules to create my own18:30
pokolihiaselhans: core modules a bit diferent, but not a lot more18:31
jvblasco_pokoli: an example would be more clear, imagine i have a table x with 3 m2o relations, y now need to move table x to table y, which in fact is the refactored model18:32
jvblasco_pokoli: if i don't create the fk in the table y, will tryton handle it when it notices?18:32
hiaselhansjvblasco_: pokoli: cool thanks! no sed needed :) will reference in docs, ok?18:33
jvblasco_pokoli: of course relations are present in the new model, othewise i would just delete the fields18:33
pokolihiaselhans: that's the perfect template for the docs :P18:34
pokolijvblasco_: if refactored why changed table name?18:34
jvblasco_pokoli: cause one of my issues has become naming18:34
pokolijvblasco_: tryton will only create the table with empty data18:35
jvblasco_pokoli: the code just growth much more than i expected18:35
pokolijvblasco: so you just need a register that test if the id column exists, if not exists, make the SELECT INTO with the modified fields18:35
pokolijvblasco_: and the same for the relations, as I imagine you also changed the names18:36
jvblasco_pokoli: yeah, some of them, but not all the relations18:36
pokolijvblasco_: so the ones that haven't changed, just rename the column18:37
pokolijvblasco_: not sure if it will work on fields with FOREIGN KEYS, but you can try18:37
jvblasco_pokoli: i c18:37
jvblasco_pokoli: i wonder if it's the new model that will need to execute all those queries on a __register__ call18:38
pokolijvblasco_: yes, because it's on the new model when you know if you are creating the table18:39
-!- ronaldm(~ronaldm@ has joined #tryton18:40
pokolijvblasco_: have a look at
pokolijvblasco_: sorry:
pokolijvblasco_: the super call it's where you database tables and columns are created18:40
pokolijvblasco_: so just test if table_exist before super call, and if not, execute queries after super call18:41
jvblasco_pokoli: interesting18:43
-!- ronaldm(~ronaldm@ has joined #tryton18:44
pokolijvblasco_: the super method is what you call magic ^^18:44
jvblasco_pokoli: i need to give this a bit of thinking, seems the right way to do that18:44
jvblasco_pokoli: yeah, seems like it lol18:44
pokolijvblasco_: of course you can do a migration with a ETL, but i think that tryton is enough for your case18:45
jvblasco_pokoli: well, that's why we created the concept of ETL, it handle anything18:46
jvblasco_pokoli: but you're right handling it just with tryton it's a better approach than building an ETL18:46
pokolijvblasco_: in the ETL, you will do the same, SELECTS and INSERTS :P18:47
pokolijvblasco_: and some update you can do with a rename from tryton18:47
jvblasco_pokoli: but at that layer, my tryton knowledge is really limited, i'm still scratching tryton's surface18:48
jvblasco_pokoli: well, i have snipets enough around to take a more object oriented approach with the etl, and treat data a more object oriented way, and let tryton handle creates, inserts and so on18:48
pokolijvblasco_: and yes ETLs handle everything, we have ETLs that migrates from OpenERP to Tryton, taking in account the installed modules18:49
jvblasco_pokoli: models are almost the same in most cases, just suffered a huge renaming, including models name18:50
-!- hiaselhans(~Thunderbi@ has joined #tryton18:50
pokolijvblasco_: so just Select the original field names and INSERT the target names18:51
pokolijvblasco_: you can use python-sql to build the queries for you
pokolijvblasco_: see the Insert query with query section18:52
-!- munro(~ronaldm@ has joined #tryton18:52
-!- sharoonthomas(~sharoonth@ has joined #tryton18:56
jvblasco_pokoli: mmmmm, looks like a much better approach18:56
jvblasco_pokoli: going to read some docs, thnx so much for the help18:57
-!- prksh(~prksh@ has joined #tryton18:58
-!- hiaselhans(~Thunderbi@ has joined #tryton18:58
-!- ronaldm(~ronaldm@ has joined #tryton19:08
-!- ronaldm(~ronaldm@ has joined #tryton19:13
-!- hiaselhans(~Thunderbi@ has joined #tryton19:15
-!- ronaldm(~ronaldm@ has joined #tryton19:33
-!- hiaselhans(~Thunderbi@ has joined #tryton19:43
-!- cedk(~ced@ has joined #tryton20:19
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton20:19
-!- hiaselhans(~Thunderbi@ has joined #tryton20:26
-!- prksh(~prksh@ has joined #tryton20:39
-!- grasbauer( has joined #tryton21:10
-!- bechamel( has joined #tryton21:11
-!- smarro(~sebastian@ has joined #tryton21:14
-!- bechamel( has joined #tryton21:49
-!- smarro(~sebastian@ has joined #tryton21:50
-!- pablovannini( has joined #tryton22:25
-!- hiaselhans(~Thunderbi@ has joined #tryton22:49
-!- smarro(~sebastian@ has joined #tryton23:15
-!- uranus( has joined #tryton23:43

Generated by 2.11.0 by Marius Gedminas - find it at!