IRC logs of #tryton for Saturday, 2011-04-02

chat.freenode.net #tryton log beginning Sat Apr 2 00:00:01 CEST 2011
2011-04-02 00:47 -!- woakas(~woakas@200.106.202.91) has joined #tryton
2011-04-02 05:18 -!- yangoon(~mathiasb@p54B4E252.dip.t-dialin.net) has joined #tryton
2011-04-02 06:33 -!- alimon(~alimon@189.154.109.4) has joined #tryton
2011-04-02 06:37 <Mayank> cedk: ping!
2011-04-02 07:21 -!- okko(~okko@dhcp-077-251-140-095.chello.nl) has joined #tryton
2011-04-02 08:27 -!- okko1(~okko@dhcp-077-251-140-095.chello.nl) has joined #tryton
2011-04-02 09:43 -!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton
2011-04-02 10:12 -!- okko(~okko@dhcp-077-251-140-095.chello.nl) has joined #tryton
2011-04-02 10:30 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2011-04-02 10:46 -!- FWiesing(~franz@mail.tryton.at) has joined #tryton
2011-04-02 11:23 -!- Mayank1(~beakkon@122.173.195.64) has joined #tryton
2011-04-02 12:42 -!- enlightx(~enlightx@dynamic-adsl-94-34-174-1.clienti.tiscali.it) has joined #tryton
2011-04-02 13:24 -!- Mayank(~beakkon@122.173.198.132) has joined #tryton
2011-04-02 13:56 <Mayank> cedk: Hello, I was unable to catchup on the project. Had a very busy week. Cazou yesterday opted for the Gantt Chart idea yesterday. The idea of adding historical timeline to the GTK client. The same has been on the Ideas list of 2009 and 2010 too. This would be really helpful in conditions where recoveries are required or when a general revert to older record versions are required. Can I know something about the implementation?
2011-04-02 13:57 -!- pjstevns(~pjstevns@helpoort.xs4all.nl) has joined #tryton
2011-04-02 13:59 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 14:02 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 14:12 <cedk> Mayank: there is no doc on the implementation
2011-04-02 14:12 <cedk> Mayank: you can search in trytond for _history which is the attribute that activate the history
2011-04-02 14:13 <Mayank> cedk: any rough idea would help?
2011-04-02 14:13 <Mayank> cedk: ok thanks!
2011-04-02 14:13 <Mayank> will look into it
2011-04-02 14:14 <cedk> Mayank: the design is quite simple, for Models with _history = True a table __history is created
2011-04-02 14:14 <cedk> Mayank: and for each modification of row in the main table a copy is done in __history one
2011-04-02 14:15 <cedk> Mayank: also there is no issue to have students that apply on the same idea
2011-04-02 14:15 <cedk> Mayank: the best one will be choosen
2011-04-02 14:16 <cedk> Mayank: that's why we encourage to apply for more than one idea
2011-04-02 14:17 <cedk> Mayank: you can have a look at http://hg.tryton.org/modules/sale_opportunity it is a module that use _history functionality
2011-04-02 14:25 <Mayank> cedk: I will look up the __history table and play with records. I initially planned to send in two proposals one for creating a module that generates SQL string (sticking to the initial one) and this one. As I am already behind the planned schedule I want to prioritize work on the main proposal first and then get back to the initial one (for which the other students are already applying). Though I am behind the time-line, I really want to be a successful
2011-04-02 14:25 <Mayank> I will install the sale_opportunity module and get into the code.
2011-04-02 14:57 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 15:21 -!- nicoe(~nicoe@193.200.42.59) has joined #tryton
2011-04-02 15:28 -!- nicoe(~nicoe@193.200.42.59) has left #tryton
2011-04-02 15:32 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 15:36 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 15:51 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 16:03 -!- pjstevns(~pjstevns@helpoort.xs4all.nl) has joined #tryton
2011-04-02 16:07 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 16:17 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 16:20 -!- Mayank(~beakkon@122.161.39.86) has joined #tryton
2011-04-02 16:22 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 16:41 <sharoon> Mayank: did u check the sale_opportunity module ?
2011-04-02 16:42 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 16:47 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 16:52 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 16:58 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 17:03 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 17:04 -!- caravel(~caravel@1.Red-81-44-157.dynamicIP.rima-tde.net) has joined #tryton
2011-04-02 17:08 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 17:11 -!- alimon(~alimon@189.154.109.4) has joined #tryton
2011-04-02 17:15 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 17:20 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 17:25 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 17:30 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 17:31 -!- chrue(~chrue@host-091-097-069-118.ewe-ip-backbone.de) has joined #tryton
2011-04-02 17:32 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2011-04-02 17:33 -!- ikks(~ikks@190.158.104.249) has joined #tryton
2011-04-02 17:35 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 17:40 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2011-04-02 17:55 -!- Mayank1(~beakkon@122.162.144.196) has joined #tryton
2011-04-02 17:55 -!- Mayank1(~beakkon@122.162.144.196) has left #tryton
2011-04-02 18:12 -!- sharoon(~sharoon@173-9-190-190-miami.txt.hfc.comcastbusiness.net) has left #tryton
2011-04-02 19:19 -!- alimon(~alimon@189.154.109.4) has joined #tryton
2011-04-02 20:38 -!- Mayank(~beakkon@122.162.144.196) has joined #tryton
2011-04-02 20:51 -!- Mayank1(~beakkon@122.161.36.182) has joined #tryton
2011-04-02 20:54 -!- plantian(~ian@c-67-169-72-36.hsd1.ca.comcast.net) has joined #tryton
2011-04-02 20:59 -!- sharoon(~sharoon@173-9-190-190-miami.txt.hfc.comcastbusiness.net) has joined #tryton
2011-04-02 21:02 -!- sharoon(~sharoon@173-9-190-190-miami.txt.hfc.comcastbusiness.net) has left #tryton
2011-04-02 21:03 -!- sharoon(~sharoon@173-9-190-190-miami.txt.hfc.comcastbusiness.net) has joined #tryton
2011-04-02 21:21 -!- okko(~okko@dhcp-077-251-140-095.chello.nl) has joined #tryton
2011-04-02 21:52 -!- pjstevns(~pjstevns@helpoort.xs4all.nl) has left #tryton
2011-04-02 21:56 <Mayank> sharoon: yes i checked the sale_opportunity module looked up the __history table. Also other modules - account_invoice_history, product_cost_history, the tables - _line__history have __id field. So the project will be to create a display which can show the old records in accordance with a timeline. Can reverting back to these old records be also implemented? If yes, then the present needs to be stored too I guess.
2011-04-02 22:06 <cedk> Mayank: reverting back will be just writing old value to the record
2011-04-02 22:10 <Mayank> cedk: yes, so it can be implemented as well. To deal with the current records can we store them as well? And add to the timeline with a tag like - current records or future/post-date records (when an administrator chooses to revert to the old ones)?
2011-04-02 22:21 <cedk> Mayank: no, the current record must be only stored in the origin table
2011-04-02 22:25 <Mayank> cedk: Ok, but how will it deal with a condition where there it is desired to revert back to the old records, and keep the current records (those added after the date of revert) as well. I may be getting it wrong.
2011-04-02 22:32 <cedk> Mayank: I don't understand, revert back will always modify the current record
2011-04-02 22:38 <Mayank> cedk: What I am trying to say is, let the current date is - 2nd April, 2011. A person wants to revert back to the records that were there on 21st March, 2011. But he has added new records between 21st March and 2nd April 2011. The person wants to revert back to the records of 21st March, 2011, but at the same time does not want to lose the new records that he/she added after 21st March. So how to deal with it? Can there be a tag on the timeline which shows
2011-04-02 22:40 <sharoon> Mayank: just writing new values (from the __history record) into the master table will create a history record for the current record
2011-04-02 22:43 <sharoon> cedk: Mayank: http://images.apple.com/macosx/what-is-macosx/images/timemachine_hero20090608.png
2011-04-02 22:47 <Mayank> sharoon: yes thats exactly what I meant. I havent used the Timemachine though, but it must have the feature of saving the current records I assume. Is it already implemented in tryton this way? If yes, then in the historical time-line can we have a region that shows up your "future" records that were there before the revert?
2011-04-02 22:57 -!- fares(~fares@41.225.109.190) has joined #tryton
2011-04-02 23:00 <sharoon> Mayank: Let me reuse your example.
2011-04-02 23:00 <sharoon> 2nd April
2011-04-02 23:00 <sharoon> Master Table:
2011-04-02 23:00 <sharoon> name => apple
2011-04-02 23:00 <sharoon> History Table:
2011-04-02 23:00 <sharoon> 21st March: name => pear
2011-04-02 23:00 <sharoon> 22nd March: name => orange
2011-04-02 23:00 <sharoon> 30th March: name => grape
2011-04-02 23:01 <sharoon> if on 2nd april you write to the record that the name is pear, then it is equivalent to reverting to 21st mar
2011-04-02 23:01 <sharoon> in the write event, tryton will automatically insert the record with apple into the history table
2011-04-02 23:02 <sharoon> so your history will now look like:
2011-04-02 23:02 <Mayank> sharoon: oh, yes. I get it. Thanks!
2011-04-02 23:03 <sharoon> 21st March: name => pear
2011-04-02 23:03 <sharoon> 22nd March: name=> orange
2011-04-02 23:03 <sharoon> 30th March: name=>grape
2011-04-02 23:03 <sharoon> 2nd April=>apple
2011-04-02 23:03 <sharoon> i think i have missed the behaviour slightly, cedk could confirm - i think the history records are created for the latest record also
2011-04-02 23:06 <sharoon> Mayank: http://hg2.tryton.org/trytond/file/63841a1a6bd6/trytond/model/modelsql.py#l397
2011-04-02 23:07 <sharoon> Mayank: a history record is created whenever a create happens, so in my example the history table will have one more record (the current entry in master table as well)
2011-04-02 23:08 <cedk> sharoon: yes the last entry of history table is the current record
2011-04-02 23:08 <sharoon> cedk: yep, http://hg2.tryton.org/trytond/file/63841a1a6bd6/trytond/model/modelsql.py#l902
2011-04-02 23:09 <sharoon> cedk: have you used blinker ? http://pypi.python.org/pypi/blinker/1.0
2011-04-02 23:09 <cedk> sharoon: no
2011-04-02 23:10 <sharoon> cedk: i used it for an openerp module to emulate the functionality of triggers in tryton.
2011-04-02 23:10 <Mayank> sharoon: thanks for the link, Ok, so the apple record will go in the __history table as well. So now for creating a timeline display the display should be able to distinguish between todays record and other history records.
2011-04-02 23:11 <Mayank> I mean a section/region showing - "Today" or as a whole combined in "History"
2011-04-02 23:13 <sharoon> Mayank: I have not thought about the design itself, but probably what could be done is have a progress bar/which works like a timeline bar in the history view and on_change of the progress bar value, reload the record with that datetime as _datetime in the context, that should send you the record as it was on that day. see http://hg2.tryton.org/trytond/file/63841a1a6bd6/trytond/model/modelsql.py#l476
2011-04-02 23:13 <sharoon> Mayank: I think that is what the design expects, you can confirm with cedk or put up your own proposal :)
2011-04-02 23:15 <cedk> sharoon Mayank agree
2011-04-02 23:18 <Mayank> sharoon: Hmm, thats what the design should be like. cedk has already confirmed it. I will go through modelsql.py and start working on my proposal too.
2011-04-02 23:18 <Mayank> cedk, sharoon: Thanks for your time :)
2011-04-02 23:19 <Mayank> proposal/application*
2011-04-02 23:19 <sharoon> Mayank: good luck, I am sure it will be a wonderful idea to implement.
2011-04-02 23:21 <Mayank> sharoon: Yep, definitely it will be. Thanks again.
2011-04-02 23:37 <sharoon> cedk: do you think we could use blinker for signalling/trigger in tryton
2011-04-02 23:41 <cedk> sharoon: don't know
2011-04-02 23:42 <cedk> sharoon: but I think you could make trigger sending message to a server that will broadcast it
2011-04-02 23:43 <sharoon> cedk: that will be a message queue ?
2011-04-02 23:44 <sharoon> cedk: BTW, i was running celery with tryton to do a bulk data transfer + integration with some legacy systems for a customer and his e-commerce systems... i ran into some assertion errors with Transaction after some time
2011-04-02 23:44 <sharoon> cedk: have you seen such issues before ?
2011-04-02 23:47 <cedk> sharoon: no
2011-04-02 23:47 <cedk> sharoon: you should post traceback
2011-04-02 23:48 <sharoon> ok, i am really not sure its related to something to do with celery configuration, i am rewriting script now. the moment i see the issue again i willpost a traceback
2011-04-02 23:49 <sharoon> the work made me think about the tryton request dispatching itself, which could infact be replaced with a message queue and workers
2011-04-02 23:51 <sharoon> cedk like the netrpc and xml rpc requests delegating asynchronously to something like rabbitmq and then worker threads starting from dispatching to model/method
2011-04-02 23:51 <sharoon> cedk: do you think that will improve the scalability ?
2011-04-02 23:51 -!- alimon(~alimon@cablelink219-34.telefonia.intercable.net) has joined #tryton
2011-04-02 23:54 <cedk> sharoon: don't think async will improve perf
2011-04-02 23:54 <alimon> hi
2011-04-02 23:54 <sharoon> cedk: ok
2011-04-02 23:54 <cedk> sharoon: but if workers are separate process than it will
2011-04-02 23:54 <sharoon> cedk: workers could be even on differetn machines
2011-04-02 23:54 <sharoon> s/differetn/different
2011-04-02 23:55 <sharoon> cedk: and ofcourse workers could be different processes and are concurrent themselves
2011-04-02 23:56 <cedk> sharoon: not sure it will help to have on separate machine because you will still have the database as bottleneck
2011-04-02 23:56 <sharoon> cedk: agree
2011-04-02 23:57 <sharoon> cedk: also something i liked is celery beats - which could replace the scheduler/cron we have
2011-04-02 23:57 -!- caravel(~caravel@1.Red-81-44-157.dynamicIP.rima-tde.net) has joined #tryton

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!