IRC logs of #tryton for Wednesday, 2013-10-30

chat.freenode.net #tryton log beginning Wed Oct 30 00:00:02 CET 2013
cedknicoe: this is a pretty big issue: http://codereview.tryton.org/1461002/09:43
cedknicoe: could you stop the bot until fixed09:43
cedknicoe: the regexp of review bot is wrong: http://codereview.tryton.org/1461002/10:19
cedknicoe: I also think there is an infinite loop by using modified because bot modify it10:20
cedknicoe: I deactivate the bot10:20
pokolianyone has experiences with _history and one2Many fields?11:01
cedkpokoli: currently I'm working with _history11:03
pokolicedk: good to know :)11:05
pokolicedk: I want to introduce history on production bom, so would be great if you can give me some tips on how to historize, inputs and outputs11:05
pokoliI have created a model with a table_query functions that fetches all the versions of the bom, but i'm unable to see any inputs and outputs on this form11:06
pokoliAnd I want to show the inputs/outputs as it was in this version11:07
cedkpokoli: I don't think it is a good idea11:08
cedkpokoli: I think BOM versioning should be managed at user level11:08
pokolicedk: what do you mean by "at user level"??11:09
cedkpokoli: manually ?11:13
pokolicedk: Of course, I have to create a wizard to create new versions11:14
pokolicedk: but i want to avoid creating a new model with the same fields as bom, to store all the versions history11:14
cedkpokoli: I think you misunderstand what is _history11:16
cedkpokoli: and to make revision of BOMs you don't need to create a new Model, just add some fields like start/end date, version number etc.11:16
cedkpokoli: but if it is not business versioning, just take a look at the opportunity module11:19
pokolicedk: yes it is business versioning, and i have looked opportunity module11:20
pokolicedk: I was thinking in how to have a view of the current version of the BOMs11:20
cedkpokoli: so business versioning should not be done with _history11:22
pokolicedk: thanks, i will try what you proposed.11:23
cedkpokoli: making a new version = copying existing and change the new one11:26
pokolicedk: yes, my main problem is how to have a one2Many to all the related versions11:27
cedkpokoli: you can add a new Model that will be shared with all BOM's11:29
cedkpokoli: or you can just rely on a code11:30
pokolicedk: i was thinking on saving the id of the first version, and copy it on all the versions. It's like the code, but transparent to the user. But how to retrieve all the records that have the same code on the One2Many?11:32
cedkpokoli: using ID to expose to use is bad idea11:35
pokolicedk: i won't expose ID field, only use it internally11:43
cedkpokoli: I think you will miss something that define what all those BOMs are in11:44
pokolicedk: agree, but all those BOMs are in the first BOM11:47
pokolicedk: so maybe using another model to store this relation, could solve the problem11:48
cedkpokoli: there are not "in"11:50
pokolicedk: not "in" but related11:50
cedkpokoli: yes and so what's make a relation is a foreign key -> Many2One11:51
pokolicedk: yes, so it's better to show all versions with a relate action11:55
pokolicedk: i will try with this implementation11:55
pokolicedk: i will try with this implementation11:55
cedknicoe: why this changeset: http://hg.tryton.org/trytond/rev/96962d9f896d12:49
cedknicoe: indeed I think the test is wrong12:55
cedknicoe: it seems to miss a test on the context _datetime because if the record is deleted in the future relativly to context, it should not be removed from the search13:06
pokoliHI, it's possible to change the order of and action inside of a StateAction?13:44
cedkpokoli: why not as you receive the action and must return it15:00
pokolicedk: have tried action['order'] = ('version', 'DESC')  before returning, and it didn't work.15:04
cedkpokoli: it is pyson_order15:04
cedkpokoli: see http://hg.tryton.org/modules/account/rev/c3a9de41b1c015:05
pokolicedk: thanks! Worked like a charm15:06
pokolicedk: I can found it in docs http://doc.tryton.org/3.0/search.html?q=pyson_order maybe it should be improved?15:08
cedkpokoli: Models from ir nor res are not documented15:09
pokolicedk: but documenting possible modifications on actions should be a good improvement15:13
giedriuscedk: do you have any plans to improve testing, especially scenario testing which is currently using doctests?17:25
cedkgiedrius: no17:26
giedriuscedk: i'm getting lost in writing these doctests. I feel it would be better to write them in plain python, so i can import some parts of the code used in all my test scenarios (in single module). Now I need duplicate it all the time.17:27
cedkgiedrius: plain python will require 1 test statement after each line17:28
giedriuscedk: and then i found some articles explaining my pain :) http://bemusement.org/diary/2008/October/23/narrative-tests and http://bemusement.org/diary/2008/October/24/more-doctest-problems17:29
giedriuscedk: why it would be needed?17:29
cedkgiedrius: because you have to test17:30
cedkgiedrius: otherwise just write unittest17:31
cedkgiedrius: by the way, rst file are not unittest, it is scenario17:31
giedriuscedk: in scenario testing you don't need to check every statement, only those which is important for your scenario17:32
cedkgiedrius: no it must fail asap17:34
cedkgiedrius: and scenario should check each steps17:35
giedriuscedk: basically, scenario tests are a transcription from natural language to computer code17:38
giedriuscedk: i mean, if i test my module which interacts with other 5 modules, I don't need to check if these modules are working correctly on mine module scenario test17:40
giedriuscedk: now the problem is, i need to write 10 scenarios for a module where each scenario has ~200 LOC, and ~100 LOC are the same on each scenario17:43
giedriuscedk: another problem, testing of these scenarios run very long, because each scenario needs to setup db and initial data17:44
cedkgiedrius: you can not correctly test if you don't create a new database17:45
cedkgiedrius: for the setup, I think we should think about a toolbox to reduce the setup17:46
giedriuscedk: db setup and initial data is the same for all tests, so why not copy initial db (sqlite file) for each test or something like that17:46
cedkgiedrius: because test must be run indepently17:49
cedkgiedrius: and having always the same is also wrong17:49
giedriuscedk: having the same initial data is not bad, because it is easier to understand why one of your scenario fails17:50
giedriuscedk: i have feeling that tests could be made more useful on tryton, but unfortunatily, i don't have a clear offer yet :)17:53
cedkgiedrius: scenario are not unittest17:54
giedriuscedk: i know17:54
giedriuscedk: scenario doest meant to be not verbose17:55
cedkgiedrius: the only common part is installing ir/res modules17:58
giedriuscedk: they only differs on scope, everything else (mostly) is the same18:01
cedkgiedrius: don't understand18:01
giedriuscedk: unit testing is used to test outcome of single small part of the system (mostly some method), scenario is used to test whole system outcome for expect behaviour described by user18:03
giedriuscedk: like, if my inventory cost method is fifo and i consume these 3 stock items my inventory value will be 100€18:06
giedriuscedk: and then you need to translate this scenario to python code and put in your module :-)18:07
giedriuscedk: by doing this, i don't really care if moves are created, what is states of these moves, etc (such a things should be tested with unittests). My main concern is that the inventory value will be 100€ after consuming 3 items18:09
cedkgiedrius: that's wrong, you have to test if moves are created, what are their values etc.18:15
cedkgiedrius: because your description is too small and than is not enough to validate the behavior18:16
giedriuscedk: i haven't heard such a teory. Test scenario is just a real world case written to be understandable to computer18:25
cedkgiedrius: yes but your example is not a valid real world case for me18:26
cedkgiedrius: it is just like a fuzzy description of the functionnality18:27
cedkgiedrius: but I agree for example the creation of account chart should be factorized but I don't know how18:29
giedriuscedk: it was just a small example, not getting to details18:29
giedriuscedk: i like how scenario testing is exlained in the link i've pasted above: Narrative tests are lousy unit tests. Narratives tell a story. Something happens, then another thing, and another thing, one after the other, in sequence. Earlier events influence later ones as the story gradually assembles a complete picture. Humans like stories, our brains are used to telling them and receiving them.18:31
giedriuscedk: by telling story, you never go in details by describing the subject. Normally you just tell details which is important to understand your story18:34
cedkgiedrius: I think you follow the comparison to close, the goal is to test18:39
giedriuscedk: thats obvious. I just disagree that in scenario test every interaction must be tested in details. It depends situation. As I see i fail to explain it, but lets leave this for now. Just wanted to know if something is planned here18:47
pokolihi, it's possible to Open and StateAction in the current tab (not in a new one)19:33
cedkpokoli: no19:34
pokolicedk: :(19:47
motaroHello everyone how are things doing around here.19:51
motaroI'm having an issue developing a module; it consist that I'm developing a module that is an extension of project module and it doesn't seem to work. The server is loading it but the tab in the work form is not showing. My logic tells me that is a problem with the xml but I'm not getting any messages from the server.19:54
cedkpokoli: it is linked to your feature request: https://bugs.tryton.org/issue334319:57
cedkmotaro: check if your XML is loaded when you update the DB19:58
motarowould the locale matter I haven't done a locale file for it?20:04
cedkmotaro: no20:05
pokolicedk: i don't know how to implement it, but will be a great feature20:05
pokolimotaro: check that you have the correct model in the view, and the xpath expresion is a valid one20:05
pokolimotaro: I can review your module if you upload it to pastebin20:06
motarocedk: It says that the file work.xml is loaded, although page details are under moduleName/view/work_form.xml which does not show.20:06
motarocedk: I have the 'record' definition on work.xml20:07
cedkmotaro: you can also check from the GUI under Administration/UI/views20:07
joarthis might be a bit off topic, but what do you use to generate the IRC logs at http://www.tryton.org/~irclog/ ?20:17
motarocedk: Look I checked and it shows the entry for the view although is not getting the xml in the view folder of the module.20:17
cedkmotaro: probably a typo in name20:20
cedkjoar:  logs2html.py20:21
cedkjoar: and ii20:21
motarocedk: Thank you for the help, I put the wrong field.20:26
joarcedk:20:27
joarcedk: can you tell me why the project has commit peaks every 6 months? http://www.ohloh.net/p/tryton20:28
joaris that your release cycle?20:28
joarsorry for the empty cedk: I don't know how it got there20:28
joarthe project also has contributor peaks every 6 months.20:28
joarcedk: is it merges with OpenERP?20:31
pokolijoar: tryton has a release cycle of 6 months20:33
pokolijoar: so those peaks correspond with the relase20:33
joarpokoli: I see, do you merge OpenERP stuff into tryton on a regular basis?20:34
pokolijoar: I don't merge OpenERP stuff, and I think that nobody is doing20:34
joarSo OpenERP and Tryton development branched in 2008?20:35
pokolijoar: yes20:37
pokolijoar: I wonder why you are asking about OE20:37
joarThe reason I'm asking these 'odd' questions is that I'm doing an evaluation of Tryton for Software Freedom Conservancy: http://npoacct.sfconservancy.org/ExistingProjects/Tryton/20:37
joarand http://npoacct.sfconservancy.org/ExistingProjects/20:37
joarand http://sfconservancy.org/campaign/20:38
pokolijoar: have a look at www.openerp2tryton.com20:38
pokolijoar: I remeber proposing tryton for sfconservancy some month ago via twitter ;)20:38
joar:)20:39
joarIf you want to, you are more than welcome to extend the page on tryton.20:40
cedkjoar: we don't merge any code from OE because they have a different license now20:40
joarI see20:41
joaraccording to wikipedia it's licensed under the AGPL, has that changed?20:41
cedkjoar: no OE=AGPL, Tryton=GPL20:42
pokolijoar: i'm writting to the tryton page by now :)20:42
joarI see20:42
cedkjoar: also we don't merge because we don't see anything good enough to be merged :-)20:44
joarcedk: I see20:44
cedkjoar: and also the design/API has diverged a lot that merge without rework probably will not work21:00
pokolijoar: i update the tryton page, hope it helps :D21:00
joarthank you very much pokoli!21:01
joarcedk: ack.21:01
motaroIn a One2Many field how can I set the fields of the object that should show on the tree view?21:14
pokolimotaro: it uses the default views from the model if you don't explicity view_ids21:16
-!- pablovannini(~pablo@181.47.181.28) has left #tryton21:41
motaroTalk to you tomorrow.22:33
-!- motaro(be7a662c@gateway/web/freenode/ip.190.122.102.44) has left #tryton22:33

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