chat.freenode.net #tryton log beginning Wed Oct 30 00:00:02 CET 2013 | ||
2013-10-30 09:43 <cedk> nicoe: this is a pretty big issue: http://codereview.tryton.org/1461002/ | ||
2013-10-30 09:43 <cedk> nicoe: could you stop the bot until fixed | ||
2013-10-30 10:19 <cedk> nicoe: the regexp of review bot is wrong: http://codereview.tryton.org/1461002/ | ||
2013-10-30 10:20 <cedk> nicoe: I also think there is an infinite loop by using modified because bot modify it | ||
2013-10-30 10:20 <cedk> nicoe: I deactivate the bot | ||
2013-10-30 11:01 <pokoli> anyone has experiences with _history and one2Many fields? | ||
2013-10-30 11:03 <cedk> pokoli: currently I'm working with _history | ||
2013-10-30 11:05 <pokoli> cedk: good to know :) | ||
2013-10-30 11:05 <pokoli> cedk: 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 outputs | ||
2013-10-30 11:06 <pokoli> I 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 form | ||
2013-10-30 11:07 <pokoli> And I want to show the inputs/outputs as it was in this version | ||
2013-10-30 11:08 <cedk> pokoli: I don't think it is a good idea | ||
2013-10-30 11:08 <cedk> pokoli: I think BOM versioning should be managed at user level | ||
2013-10-30 11:09 <pokoli> cedk: what do you mean by "at user level"?? | ||
2013-10-30 11:13 <cedk> pokoli: manually ? | ||
2013-10-30 11:14 <pokoli> cedk: Of course, I have to create a wizard to create new versions | ||
2013-10-30 11:14 <pokoli> cedk: but i want to avoid creating a new model with the same fields as bom, to store all the versions history | ||
2013-10-30 11:16 <cedk> pokoli: I think you misunderstand what is _history | ||
2013-10-30 11:16 <cedk> pokoli: 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. | ||
2013-10-30 11:19 <cedk> pokoli: but if it is not business versioning, just take a look at the opportunity module | ||
2013-10-30 11:20 <pokoli> cedk: yes it is business versioning, and i have looked opportunity module | ||
2013-10-30 11:20 <pokoli> cedk: I was thinking in how to have a view of the current version of the BOMs | ||
2013-10-30 11:22 <cedk> pokoli: so business versioning should not be done with _history | ||
2013-10-30 11:23 <pokoli> cedk: thanks, i will try what you proposed. | ||
2013-10-30 11:26 <cedk> pokoli: making a new version = copying existing and change the new one | ||
2013-10-30 11:27 <pokoli> cedk: yes, my main problem is how to have a one2Many to all the related versions | ||
2013-10-30 11:29 <cedk> pokoli: you can add a new Model that will be shared with all BOM's | ||
2013-10-30 11:30 <cedk> pokoli: or you can just rely on a code | ||
2013-10-30 11:32 <pokoli> cedk: 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? | ||
2013-10-30 11:35 <cedk> pokoli: using ID to expose to use is bad idea | ||
2013-10-30 11:43 <pokoli> cedk: i won't expose ID field, only use it internally | ||
2013-10-30 11:44 <cedk> pokoli: I think you will miss something that define what all those BOMs are in | ||
2013-10-30 11:47 <pokoli> cedk: agree, but all those BOMs are in the first BOM | ||
2013-10-30 11:48 <pokoli> cedk: so maybe using another model to store this relation, could solve the problem | ||
2013-10-30 11:50 <cedk> pokoli: there are not "in" | ||
2013-10-30 11:50 <pokoli> cedk: not "in" but related | ||
2013-10-30 11:51 <cedk> pokoli: yes and so what's make a relation is a foreign key -> Many2One | ||
2013-10-30 11:55 <pokoli> cedk: yes, so it's better to show all versions with a relate action | ||
2013-10-30 11:55 <pokoli> cedk: i will try with this implementation | ||
2013-10-30 11:55 <pokoli> cedk: i will try with this implementation | ||
2013-10-30 12:49 <cedk> nicoe: why this changeset: http://hg.tryton.org/trytond/rev/96962d9f896d | ||
2013-10-30 12:55 <cedk> nicoe: indeed I think the test is wrong | ||
2013-10-30 13:06 <cedk> nicoe: 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 search | ||
2013-10-30 13:44 <pokoli> HI, it's possible to change the order of and action inside of a StateAction? | ||
2013-10-30 15:00 <cedk> pokoli: why not as you receive the action and must return it | ||
2013-10-30 15:04 <pokoli> cedk: have tried action['order'] = ('version', 'DESC') before returning, and it didn't work. | ||
2013-10-30 15:04 <cedk> pokoli: it is pyson_order | ||
2013-10-30 15:05 <cedk> pokoli: see http://hg.tryton.org/modules/account/rev/c3a9de41b1c0 | ||
2013-10-30 15:06 <pokoli> cedk: thanks! Worked like a charm | ||
2013-10-30 15:08 <pokoli> cedk: I can found it in docs http://doc.tryton.org/3.0/search.html?q=pyson_order maybe it should be improved? | ||
2013-10-30 15:09 <cedk> pokoli: Models from ir nor res are not documented | ||
2013-10-30 15:13 <pokoli> cedk: but documenting possible modifications on actions should be a good improvement | ||
2013-10-30 17:25 <giedrius> cedk: do you have any plans to improve testing, especially scenario testing which is currently using doctests? | ||
2013-10-30 17:26 <cedk> giedrius: no | ||
2013-10-30 17:27 <giedrius> cedk: 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. | ||
2013-10-30 17:28 <cedk> giedrius: plain python will require 1 test statement after each line | ||
2013-10-30 17:29 <giedrius> cedk: 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-problems | ||
2013-10-30 17:29 <giedrius> cedk: why it would be needed? | ||
2013-10-30 17:30 <cedk> giedrius: because you have to test | ||
2013-10-30 17:31 <cedk> giedrius: otherwise just write unittest | ||
2013-10-30 17:31 <cedk> giedrius: by the way, rst file are not unittest, it is scenario | ||
2013-10-30 17:32 <giedrius> cedk: in scenario testing you don't need to check every statement, only those which is important for your scenario | ||
2013-10-30 17:34 <cedk> giedrius: no it must fail asap | ||
2013-10-30 17:35 <cedk> giedrius: and scenario should check each steps | ||
2013-10-30 17:38 <giedrius> cedk: basically, scenario tests are a transcription from natural language to computer code | ||
2013-10-30 17:40 <giedrius> cedk: 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 test | ||
2013-10-30 17:43 <giedrius> cedk: 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 scenario | ||
2013-10-30 17:44 <giedrius> cedk: another problem, testing of these scenarios run very long, because each scenario needs to setup db and initial data | ||
2013-10-30 17:45 <cedk> giedrius: you can not correctly test if you don't create a new database | ||
2013-10-30 17:46 <cedk> giedrius: for the setup, I think we should think about a toolbox to reduce the setup | ||
2013-10-30 17:46 <giedrius> cedk: 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 that | ||
2013-10-30 17:49 <cedk> giedrius: because test must be run indepently | ||
2013-10-30 17:49 <cedk> giedrius: and having always the same is also wrong | ||
2013-10-30 17:50 <giedrius> cedk: having the same initial data is not bad, because it is easier to understand why one of your scenario fails | ||
2013-10-30 17:53 <giedrius> cedk: i have feeling that tests could be made more useful on tryton, but unfortunatily, i don't have a clear offer yet :) | ||
2013-10-30 17:54 <cedk> giedrius: scenario are not unittest | ||
2013-10-30 17:54 <giedrius> cedk: i know | ||
2013-10-30 17:55 <giedrius> cedk: scenario doest meant to be not verbose | ||
2013-10-30 17:58 <cedk> giedrius: the only common part is installing ir/res modules | ||
2013-10-30 18:01 <giedrius> cedk: they only differs on scope, everything else (mostly) is the same | ||
2013-10-30 18:01 <cedk> giedrius: don't understand | ||
2013-10-30 18:03 <giedrius> cedk: 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 user | ||
2013-10-30 18:06 <giedrius> cedk: like, if my inventory cost method is fifo and i consume these 3 stock items my inventory value will be 100€ | ||
2013-10-30 18:07 <giedrius> cedk: and then you need to translate this scenario to python code and put in your module :-) | ||
2013-10-30 18:09 <giedrius> cedk: 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 items | ||
2013-10-30 18:15 <cedk> giedrius: that's wrong, you have to test if moves are created, what are their values etc. | ||
2013-10-30 18:16 <cedk> giedrius: because your description is too small and than is not enough to validate the behavior | ||
2013-10-30 18:25 <giedrius> cedk: i haven't heard such a teory. Test scenario is just a real world case written to be understandable to computer | ||
2013-10-30 18:26 <cedk> giedrius: yes but your example is not a valid real world case for me | ||
2013-10-30 18:27 <cedk> giedrius: it is just like a fuzzy description of the functionnality | ||
2013-10-30 18:29 <cedk> giedrius: but I agree for example the creation of account chart should be factorized but I don't know how | ||
2013-10-30 18:29 <giedrius> cedk: it was just a small example, not getting to details | ||
2013-10-30 18:31 <giedrius> cedk: 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. | ||
2013-10-30 18:34 <giedrius> cedk: by telling story, you never go in details by describing the subject. Normally you just tell details which is important to understand your story | ||
2013-10-30 18:39 <cedk> giedrius: I think you follow the comparison to close, the goal is to test | ||
2013-10-30 18:47 <giedrius> cedk: 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 here | ||
2013-10-30 19:33 <pokoli> hi, it's possible to Open and StateAction in the current tab (not in a new one) | ||
2013-10-30 19:34 <cedk> pokoli: no | ||
2013-10-30 19:47 <pokoli> cedk: :( | ||
2013-10-30 19:51 <motaro> Hello everyone how are things doing around here. | ||
2013-10-30 19:54 <motaro> I'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. | ||
2013-10-30 19:57 <cedk> pokoli: it is linked to your feature request: https://bugs.tryton.org/issue3343 | ||
2013-10-30 19:58 <cedk> motaro: check if your XML is loaded when you update the DB | ||
2013-10-30 20:04 <motaro> would the locale matter I haven't done a locale file for it? | ||
2013-10-30 20:05 <cedk> motaro: no | ||
2013-10-30 20:05 <pokoli> cedk: i don't know how to implement it, but will be a great feature | ||
2013-10-30 20:05 <pokoli> motaro: check that you have the correct model in the view, and the xpath expresion is a valid one | ||
2013-10-30 20:06 <pokoli> motaro: I can review your module if you upload it to pastebin | ||
2013-10-30 20:06 <motaro> cedk: It says that the file work.xml is loaded, although page details are under moduleName/view/work_form.xml which does not show. | ||
2013-10-30 20:07 <motaro> cedk: I have the 'record' definition on work.xml | ||
2013-10-30 20:07 <cedk> motaro: you can also check from the GUI under Administration/UI/views | ||
2013-10-30 20:17 <joar> this might be a bit off topic, but what do you use to generate the IRC logs at http://www.tryton.org/~irclog/ ? | ||
2013-10-30 20:17 <motaro> cedk: Look I checked and it shows the entry for the view although is not getting the xml in the view folder of the module. | ||
2013-10-30 20:20 <cedk> motaro: probably a typo in name | ||
2013-10-30 20:21 <cedk> joar: logs2html.py | ||
2013-10-30 20:21 <cedk> joar: and ii | ||
2013-10-30 20:26 <motaro> cedk: Thank you for the help, I put the wrong field. | ||
2013-10-30 20:27 <joar> cedk: | ||
2013-10-30 20:28 <joar> cedk: can you tell me why the project has commit peaks every 6 months? http://www.ohloh.net/p/tryton | ||
2013-10-30 20:28 <joar> is that your release cycle? | ||
2013-10-30 20:28 <joar> sorry for the empty cedk: I don't know how it got there | ||
2013-10-30 20:28 <joar> the project also has contributor peaks every 6 months. | ||
2013-10-30 20:31 <joar> cedk: is it merges with OpenERP? | ||
2013-10-30 20:33 <pokoli> joar: tryton has a release cycle of 6 months | ||
2013-10-30 20:33 <pokoli> joar: so those peaks correspond with the relase | ||
2013-10-30 20:34 <joar> pokoli: I see, do you merge OpenERP stuff into tryton on a regular basis? | ||
2013-10-30 20:34 <pokoli> joar: I don't merge OpenERP stuff, and I think that nobody is doing | ||
2013-10-30 20:35 <joar> So OpenERP and Tryton development branched in 2008? | ||
2013-10-30 20:37 <pokoli> joar: yes | ||
2013-10-30 20:37 <pokoli> joar: I wonder why you are asking about OE | ||
2013-10-30 20:37 <joar> The 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/ | ||
2013-10-30 20:37 <joar> and http://npoacct.sfconservancy.org/ExistingProjects/ | ||
2013-10-30 20:38 <joar> and http://sfconservancy.org/campaign/ | ||
2013-10-30 20:38 <pokoli> joar: have a look at www.openerp2tryton.com | ||
2013-10-30 20:38 <pokoli> joar: I remeber proposing tryton for sfconservancy some month ago via twitter ;) | ||
2013-10-30 20:39 <joar> :) | ||
2013-10-30 20:40 <joar> If you want to, you are more than welcome to extend the page on tryton. | ||
2013-10-30 20:40 <cedk> joar: we don't merge any code from OE because they have a different license now | ||
2013-10-30 20:41 <joar> I see | ||
2013-10-30 20:41 <joar> according to wikipedia it's licensed under the AGPL, has that changed? | ||
2013-10-30 20:42 <cedk> joar: no OE=AGPL, Tryton=GPL | ||
2013-10-30 20:42 <pokoli> joar: i'm writting to the tryton page by now :) | ||
2013-10-30 20:42 <joar> I see | ||
2013-10-30 20:44 <cedk> joar: also we don't merge because we don't see anything good enough to be merged :-) | ||
2013-10-30 20:44 <joar> cedk: I see | ||
2013-10-30 21:00 <cedk> joar: and also the design/API has diverged a lot that merge without rework probably will not work | ||
2013-10-30 21:00 <pokoli> joar: i update the tryton page, hope it helps :D | ||
2013-10-30 21:01 <joar> thank you very much pokoli! | ||
2013-10-30 21:01 <joar> cedk: ack. | ||
2013-10-30 21:14 <motaro> In a One2Many field how can I set the fields of the object that should show on the tree view? | ||
2013-10-30 21:16 <pokoli> motaro: it uses the default views from the model if you don't explicity view_ids | ||
2013-10-30 21:41 -!- pablovannini(~pablo@181.47.181.28) has left #tryton | ||
2013-10-30 22:33 <motaro> Talk to you tomorrow. | ||
2013-10-30 22:33 -!- motaro(be7a662c@gateway/web/freenode/ip.190.122.102.44) has left #tryton |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!