IRC logs of #tryton for Wednesday, 2014-07-23

chat.freenode.net #tryton log beginning Wed Jul 23 00:00:01 CEST 2014
-!- udono(~udono@g225057102.adsl.alicedsl.de) has joined #tryton00:28
-!- udono1(~udono@g225057022.adsl.alicedsl.de) has joined #tryton01:30
-!- sharkcz(~sharkcz@server.danny.cz) has joined #tryton03:32
-!- sharoonthomas(~sharoonth@122.177.17.148) has joined #tryton03:48
-!- digitalsatori(~Thunderbi@114.94.153.119) has joined #tryton04:11
-!- digitalsatori(~Thunderbi@114.94.153.119) has joined #tryton05:08
-!- vak0160(~vak0160@36.72.229.107) has joined #tryton05:08
-!- bechamel(~Adium@62-197-96-189.teledisnet.be) has joined #tryton06:05
-!- prksh(~prksh@118.91.181.250) has joined #tryton06:34
-!- frispete_(~frispete@p54A91884.dip0.t-ipconnect.de) has joined #tryton06:40
-!- mar(~marius@v100.nfq.lt) has joined #tryton06:50
-!- yangoon1(~mathiasb@p549F0561.dip0.t-ipconnect.de) has joined #tryton07:01
-!- vak0160(~vak0160@36.72.229.107) has joined #tryton07:02
-!- bechamel(~Adium@62-197-96-189.teledisnet.be) 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@46.22.23.85) has joined #tryton08:16
-!- zultron(~zultron@99-190-134-148.lightspeed.austtx.sbcglobal.net) has joined #tryton08:21
-!- zultron(~zultron@99-190-134-148.lightspeed.austtx.sbcglobal.net) has joined #tryton08:22
-!- zultron(~zultron@99-190-134-148.lightspeed.austtx.sbcglobal.net) has joined #tryton08:23
-!- vcardon(~vcardon@LNeuilly-152-23-15-185.w193-252.abo.wanadoo.fr) has joined #tryton09:09
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:10
-!- bechamel(~Adium@cismwks02-virtual1.cism.ucl.ac.be) has joined #tryton09:11
-!- jeancavallo(~giovanni@bob75-9-88-181-2-176.fbx.proxad.net) has joined #tryton09:35
-!- grasbauer(~jan@ip92340dc6.dynamic.kabel-deutschland.de) has joined #tryton09:50
marhow do I update default value of property?09:54
-!- pobsteta(~Thunderbi@37.163.44.232) has joined #tryton09:56
pokolimar: not sure to understand you, default value for a ir.property 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(~nicoe@balisto.office.b2ck.com) has joined #tryton09:58
marcost_price_method is Property(Selection)09:58
marhttp://hg.tryton.org/trytond/trytond/modules/product/file/b6461c7ed59f/product.py#l4209:59
marhttp://hg.tryton.org/trytond/trytond/modules/product/file/b6461c7ed59f/product.py#l9209:59
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(~giovanni@bob75-9-88-181-2-176.fbx.proxad.net) has joined #tryton10:08
-!- open_sax(~sax@dial-109-230-31-42.orange.sk) 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@118.91.181.250) has joined #tryton10:22
marand I see that it fetches default value from ir.property with res=NULL10:22
marhttp://hg.tryton.org/trytond/trytond/modules/product/file/b6461c7ed59f/product.xml#l14510:24
-!- littlebit(~Thunderbi@ulmg-5d84709e.pool.mediaWays.net) 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@122.177.182.203) 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
mar:/10:43
cedkmar: Property field is one more shit we have to kill from OpenERP10:45
-!- littlebit(~Thunderbi@ulmg-5d84709e.pool.mediaWays.net) 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
marhttp://hg.tryton.org/trytond/file/7ca488082a42/trytond/ir/property.py#l16010:50
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@37.163.44.232) has joined #tryton11:08
-!- open_sax(~sax@dial-109-230-31-42.orange.sk) has left #tryton11:28
-!- digitalsatori(~Thunderbi@114.94.153.119) has joined #tryton11:56
-!- ronaldm(~ronaldm@197.211.216.214) has joined #tryton12:29
-!- udono(~udono@g225057022.adsl.alicedsl.de) has joined #tryton12:37
-!- bechamel(~Adium@cismwks02-virtual1.cism.ucl.ac.be) has joined #tryton13:44
-!- kstenger(~karla@200.124.209.158) has joined #tryton13:45
-!- umangarora(765bb5fa@gateway/web/freenode/ip.118.91.181.250) 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
umangarorahttps://github.com/tryton/tryton-documentation/pull/5314:07
-!- smarro(~sebastian@190.105.93.196) has joined #tryton14:18
-!- pobsteta(~Thunderbi@37.162.195.10) has joined #tryton14:31
-!- marius_(~marius@v100.nfq.lt) has joined #tryton14:51
-!- smarro(~sebastian@190.105.93.196) has joined #tryton15:06
-!- ronaldm(~ronaldm@197.211.216.214) has joined #tryton15:36
-!- alisonken1home(~alisonken@pool-71-104-227-145.lsanca.dsl-w.verizon.net) has joined #tryton15:40
-!- gremly(~gremly@190.85.36.58) has joined #tryton15:54
-!- hiaselhans(~Thunderbi@212.186.45.207) has joined #tryton15:58
-!- smarro_(~sebastian@190.105.93.196) has joined #tryton16:00
-!- ronaldm(~ronaldm@41.78.78.189) 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(~meanmicio@142.Red-83-42-60.dynamicIP.rima-tde.net) 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@122.177.182.203) has joined #tryton17:07
sharoonthomaspokoli: the build has passed, do you want to merge ? https://github.com/tryton/tryton-documentation/pull/5417:07
-!- ronaldm(~ronaldm@41.78.78.189) 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:: https://travis-ci.org/tryton/tryton-documentation.svg?branch=master17:11
sharoonthomas    :target: https://travis-ci.org/tryton/tryton-documentation17:11
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 http://docs.travis-ci.com/user/deployment/s3/17:21
pokolisharoonthomas: sorry, wrong link. This http://docs.travis-ci.com/user/deployment/custom/17:22
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@41.78.78.189) 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: https://developer.github.com/webhooks/#events17:39
sharoonthomaspokoli: meantime, i will try something too17:39
-!- alisonken1lap3(~alisonken@18.18.ultimate-int.uia.net) has joined #tryton17:40
-!- hiaselhans(~Thunderbi@212.186.45.207) 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 http://docs.travis-ci.com/user/notifications/#Webhooks-Delivery-Format17:48
sharoonthomaspokoli: sounds like a plan17:50
-!- grasbauer(~jan@business-088-079-110-234.static.arcor-ip.net) 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@116.234.181.110) has joined #tryton18:08
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton18:13
-!- seba_(~seba@49.202.15.62.static.jazztel.es) has joined #tryton18:18
-!- jvblasco_(~seba@49.202.15.62.static.jazztel.es) 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(~jan@ip92340dc6.dynamic.kabel-deutschland.de) 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 setup.py 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 http://hg.tryton.org/tryton-tools/file/b1bf3e9fe771/contrib-module-setup.tmpl18:30
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@197.221.243.233) has joined #tryton18:40
pokolijvblasco_: have a look at http://hg.tryton.org/tryton-tools/file/b1bf3e9fe771/contrib-module-setup.tmpl18:40
pokolijvblasco_: sorry: http://hg.tryton.org/modules/account/file/051e6ed2781b/move.py#l10618:40
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@197.221.243.233) 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@212.186.45.207) 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 https://code.google.com/p/python-sql/18:51
pokolijvblasco_: see the Insert query with query section18:52
-!- munro(~ronaldm@197.221.243.233) has joined #tryton18:52
-!- sharoonthomas(~sharoonth@122.177.174.183) 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@180.188.243.105) has joined #tryton18:58
-!- hiaselhans(~Thunderbi@212.186.45.207) has joined #tryton18:58
-!- ronaldm(~ronaldm@197.221.243.233) has joined #tryton19:08
-!- ronaldm(~ronaldm@197.221.243.233) has joined #tryton19:13
-!- hiaselhans(~Thunderbi@212.186.45.207) has joined #tryton19:15
-!- ronaldm(~ronaldm@197.221.243.246) has joined #tryton19:33
-!- hiaselhans(~Thunderbi@212.186.45.207) has joined #tryton19:43
-!- cedk(~ced@85.26.36.239) has joined #tryton20:19
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton20:19
-!- hiaselhans(~Thunderbi@212.186.45.207) has joined #tryton20:26
-!- prksh(~prksh@180.188.243.105) has joined #tryton20:39
-!- grasbauer(~jan@ip92340dc6.dynamic.kabel-deutschland.de) has joined #tryton21:10
-!- bechamel(~Adium@62-197-96-189.teledisnet.be) has joined #tryton21:11
-!- smarro(~sebastian@190.105.93.196) has joined #tryton21:14
-!- bechamel(~Adium@62-197-96-189.teledisnet.be) has joined #tryton21:49
-!- smarro(~sebastian@190.105.93.196) has joined #tryton21:50
-!- pablovannini(~pablo@host126.186-109-85.telecom.net.ar) has joined #tryton22:25
-!- hiaselhans(~Thunderbi@212.186.45.207) has joined #tryton22:49
-!- smarro(~sebastian@190.105.93.196) has joined #tryton23:15
-!- uranus(~uranus@ool-182fa854.dyn.optonline.net) has joined #tryton23:43

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