IRC logs of #tryton for Saturday, 2012-05-05

chat.freenode.net #tryton log beginning Sat May 5 00:00:01 CEST 2012
2012-05-05 00:00 <bechamel> cedk: I think we don't have a lot of situation where the problem arise
2012-05-05 00:00 <albertca> I don't actually know how the cache is implemented but if there's a cache per transaction
2012-05-05 00:00 <albertca> and a gloabl structure for all models
2012-05-05 00:00 <albertca> (sorry, records)
2012-05-05 00:00 <cedk> bechamel: this is not a valid answer :-)
2012-05-05 00:00 <albertca> each browse object should actually return the reference to the valid cache object..
2012-05-05 00:00 <cedk> albertca: there is a cache on cursor and a cache on each records
2012-05-05 00:01 <bechamel> cedk: example: when writing a sale line, i must also call a clear method on the coresponding sale
2012-05-05 00:02 <cedk> bechamel: yes
2012-05-05 00:02 <bechamel> cedk: I mean, let's do it explicitly
2012-05-05 00:02 <albertca> cedk: where is the problem in the cursor or record cache?
2012-05-05 00:02 <cedk> bechamel: I could not always now that sale line was written
2012-05-05 00:02 <cedk> albertca: record cache
2012-05-05 00:04 <cedk> I'm pretty sure that the right solution is what I proposed but I'm not sure about the implementation and the usage of currentframe
2012-05-05 00:04 <bechamel> cedk: no, but the code that write the line know that the cache on the sale must be cleared
2012-05-05 00:04 <cedk> bechamel: no
2012-05-05 00:05 <cedk> all we can have is to let to the dev to manage the local cache inside the code of one method
2012-05-05 00:06 <cedk> but once outside, the cache must be cleared
2012-05-05 00:06 <bechamel> cedk: ok, what about an implicit decorator ?
2012-05-05 00:06 <cedk> bechamel: we don't now what to clear
2012-05-05 00:07 <bechamel> and the decorator just loop on the args and clear everything that is an instance of a record
2012-05-05 00:07 <cedk> bechamel: and list of instances and dict with instance as value or key
2012-05-05 00:08 <cedk> bechamel: and anything deeply
2012-05-05 00:08 <cedk> bechamel: that will be too slow
2012-05-05 00:08 <cedk> bechamel: and pointless because we must be lazy on cleaning the cache
2012-05-05 00:09 <bechamel> cedk: you say "he idea will be to have an automatic clear of the cache when entering
2012-05-05 00:09 <bechamel> in a new method"
2012-05-05 00:09 <bechamel> and you propose to use inspect
2012-05-05 00:10 <bechamel> what I say is: does the same cleaning but instead of using inspect, I propose to use a decorator
2012-05-05 00:11 <bechamel> s/does/let's do/
2012-05-05 00:15 <albertca> I'm getting "500 Server Error" on codereview.tryton.org
2012-05-05 00:23 <cedk> bechamel: what I propose is to invalidate the cache when using it, not always
2012-05-05 00:23 <cedk> albertca: we got too much request today, need to wait 7h
2012-05-05 00:24 <bechamel> cedk: cache invalidation is cheap, it's reading the db that is expensive
2012-05-05 00:24 <albertca> cedk: ok, wanted to check the review to understand the problem
2012-05-05 00:25 <cedk> bechamel: it is not at least the way you suggest
2012-05-05 00:26 <cedk> albertca: it is already there in current code
2012-05-05 00:26 <cedk> albertca: but issue is not raised because we pass ids to methods instead of instance
2012-05-05 00:26 <albertca> cedk: ok, will take a look
2012-05-05 00:27 <cedk> bechamel: this has improved a lot the perfs http://hg.tryton.org/trytond/rev/3d09bdb886eb
2012-05-05 00:32 <bechamel> cedk: for me cache invalidation is just "record._dirty = True" or something similar
2012-05-05 00:34 <cedk> bechamel: yes but it is finding all records that costs
2012-05-05 00:36 <bechamel> cedk: anyway I don't talk about how to handle invalidation, I just want to point that instead of using inspect, we can use a decorator
2012-05-05 00:37 <bechamel> cedk: btw finding all the records is as easy as putting them in a dict when they are instanciated
2012-05-05 09:34 <cedk> yangoon: I think we can make bugfix release for <= 2.2
2012-05-05 09:42 <cedk> yangoon: but we should first wait that the nightly unittest finished
2012-05-05 09:49 <cedk> yangoon: by the way, it will be good to run copyright_update.py before each release of a module
2012-05-05 10:45 <yangoon> cedk: same idea here
2012-05-05 10:45 <yangoon> cedk: for the copyright script: yes, I will run it, but it doesn't produce reliable results as it is
2012-05-05 10:46 <cedk> yangoon: why?
2012-05-05 10:47 <yangoon> e.g. you have updated B2CK as copyright holder, if a member did some contribution, but not virtual things, if a member of that enterprise did a contribution
2012-05-05 10:47 <cedk> yangoon: as far as it use a address domain, it will be
2012-05-05 10:48 <yangoon> cedk: I know, but this is an assumption, that won't be adequate rather often
2012-05-05 10:49 <cedk> yangoon: I'm really not sure
2012-05-05 10:49 <yangoon> and I think you are running some modification that included Bertrand sometimes, even if there was no commit from him
2012-05-05 10:49 <cedk> yangoon: if you don't use the company email, than you are working for your self
2012-05-05 10:49 <cedk> yangoon: example?
2012-05-05 10:49 <yangoon> but I can be wrong about the latter, didn't check very closely
2012-05-05 10:50 <yangoon> cedk: I can assign a copyright to my work, to whomever I want
2012-05-05 10:50 <yangoon> of course you cannot know by script
2012-05-05 10:52 <cedk> yangoon: if you don't do it in your commit nobody know
2012-05-05 10:52 <cedk> yangoon: so not relevant
2012-05-05 10:54 <yangoon> cedk: so you also shouldn't do it for B2CK, because you also don't assign especially in your commits;)
2012-05-05 10:55 <cedk> yangoon: I use @b2ck.com to commit
2012-05-05 10:55 <yangoon> cedk: IMHO that is not enough to deduce copyright from it
2012-05-05 10:56 <yangoon> cedk: it is a problem we won't solve today
2012-05-05 10:57 <cedk> yangoon: I don't care, if people want more, they have to do it in commit
2012-05-05 10:57 <yangoon> cedk: all right, will try to do it this weekend
2012-05-05 11:32 <__efx__> I have a problem with the tryton client. The client closes each time I close a tab or an extra window. Do you think this comes from pygtk ?
2012-05-05 11:33 <__efx__> the error I get is : "The error was 'BadWindow (invalid Window parameter)'
2012-05-05 11:34 <__efx__> I tried to run with gdb but I got no more information
2012-05-05 11:44 <udono> __efx__: Hi, which os you use and which tryton version?
2012-05-05 11:46 <__efx__> I use the 2.2 version of tryton (because I use gnuhealth) and the Os is the last kubuntu (12.10), I had no problem with the previous one actually
2012-05-05 11:47 <__efx__> I mean with the previous version of kubuntu
2012-05-05 11:47 <__efx__> that's why I think this comes from the OS and not from tryton
2012-05-05 11:48 <cedk> __efx__: how do you close tab?
2012-05-05 11:53 <__efx__> with the small cross
2012-05-05 11:53 <__efx__> at the right of the tab
2012-05-05 11:53 <__efx__> but for example when I create a new database and connect to it a wizard appear
2012-05-05 11:54 <__efx__> if I cancel the wizard the client closes
2012-05-05 11:56 <cedk> __efx__: that's very strange
2012-05-05 11:57 <cedk> __efx__: do you use the strange windows manager of ubuntu?
2012-05-05 11:57 <__efx__> no I use kde
2012-05-05 11:58 <__efx__> I will try to install a minimal one like fluxbox just to try
2012-05-05 12:00 <__efx__> ok with fluxbox it works like a charm
2012-05-05 12:15 <__efx__> sad :(
2012-05-05 12:20 <__efx__> for sha fields does tryton use sha0 1 or 2 ?
2012-05-05 12:32 <cedk> __efx__: sha1
2012-05-05 12:35 <__efx__> thank you
2012-05-05 12:39 <__efx__> If I want to add a complex entry (like a patient, with medication etc.. ) automatically (I mean directly from python).
2012-05-05 12:40 <__efx__> Is there a way to find what is the code generated by the trytond server in response to the JSON-RPC message sent by the client when I create this field
2012-05-05 12:41 <cedk> __efx__: don't understand the question
2012-05-05 12:41 <__efx__> that's because of my beautiful english :D could we meet on #tryton_fr ?
2012-05-05 12:43 <cedk> __efx__: yes
2012-05-05 12:50 <cedk> __efx__: it is #tryton-fr
2012-05-05 12:51 <__efx__> mhh
2012-05-05 18:00 <cedk> smarro: hi, is it you who is working on BI?
2012-05-05 18:01 <smarro> cedk: yes
2012-05-05 18:03 <cedk> smarro: have you something to show?
2012-05-05 18:03 <cedk> smarro: because I had to think about it and I have some ideas
2012-05-05 18:04 <smarro> cedk: actually i'm working in a Flask application, that use Trytond as a server
2012-05-05 18:04 <smarro> cedk: to populate a new warehouse database, with the functional fields calculated
2012-05-05 18:05 <smarro> cedk: it uses sqlalchemy and cubes library
2012-05-05 18:05 <cedk> smarro: why Flask?
2012-05-05 18:06 <smarro> cedk: because it is light, and uses werkzeug.... but it can be any Python web framework
2012-05-05 18:08 <cedk> smarro: I mean what is the usage of Flask?
2012-05-05 18:09 <smarro> cedk: I use Flask-admin, to define the cubes, measures, dimensions, etc... and the templates to show last migrated datetime, for models
2012-05-05 18:10 <smarro> cedk: and templates to drill in the dimensions and show statistic (just beggining)
2012-05-05 18:10 <cedk> smarro: why not Tryton?
2012-05-05 18:11 <cedk> smarro: because my idea was to define a Model that inherit ModelStorage that will query cubes
2012-05-05 18:11 <smarro> cedk: first idea was to use Tryton, to define cubes, dimensions... i have the code of that olap module
2012-05-05 18:12 <smarro> cedk: but, then i thought that maybe is better to define the cubes in the same application that is going to work with them
2012-05-05 18:13 <cedk> smarro: I personnaly think defining cubes is a dev job
2012-05-05 18:13 <cedk> smarro: but I was talking about showing result with the Tryton client
2012-05-05 18:13 <smarro> cedk: i think that an advanced technical user, can do that job
2012-05-05 18:14 <smarro> cedk: ah, ok... no i wasn't worked with that
2012-05-05 18:15 <cedk> smarro: have you example of cubes definition?
2012-05-05 18:15 <smarro> cedk: because the idea to use the Tryton operational db to query, is not a good idea
2012-05-05 18:15 <smarro> cedk: i'm sending you the module
2012-05-05 18:15 <cedk> smarro: I don't want to use the operational DB
2012-05-05 18:15 <smarro> cedk: ok
2012-05-05 18:16 <cedk> smarro: just the client and the server
2012-05-05 18:16 <cedk> smarro: you don't have a public repo?
2012-05-05 18:17 <smarro> cedk: i can upload... give me a couple of minutes
2012-05-05 18:25 <smarro> cedk: https://bitbucket.org/smarro/tryton_olap
2012-05-05 18:26 <smarro> cedk: it's just a test ;-)
2012-05-05 18:37 <cedk> smarro: ok but what is Schema?
2012-05-05 18:38 <smarro> cedk: it's an idea taken from http://mondrian.pentaho.com/documentation/schema.php#What_is_a_schema
2012-05-05 18:38 <smarro> cedk: my first idea, was to generate a xml file for mondrian
2012-05-05 18:39 <cedk> smarro: ok because it doesn't exist in cubes
2012-05-05 18:39 <smarro> cedk: no, that module is before cubes
2012-05-05 18:43 <cedk> smarro: so why not storing model.json in the database
2012-05-05 18:43 <cedk> smarro: even if I'm not really sure about that
2012-05-05 18:43 <smarro> cedk: http://pastebin.com/YNZyQ1Br is with cubes
2012-05-05 18:44 <cedk> any, it is just details
2012-05-05 18:45 <cedk> let's say we have a cubes server running
2012-05-05 18:45 <cedk> my idea is to browse it via the Tryton client
2012-05-05 18:46 <smarro> cedk: sounds good
2012-05-05 18:47 <cedk> smarro: because browsing could be seen just as a treeview
2012-05-05 18:48 <cedk> smarro: so I think it can be managed with the current API, with a view_get generated on the fly
2012-05-05 18:48 <smarro> cedk: yes... like albert did with babi
2012-05-05 18:48 <cedk> depending of the dimension browsed
2012-05-05 18:49 <cedk> smarro: don't know, I never saw babi
2012-05-05 18:49 <smarro> cedk: i saw the screenshots
2012-05-05 18:49 <smarro> cedk: i mean, about the use of a treeview
2012-05-05 18:51 <smarro> cedk: browse cubes with Tryton client... that would be great!
2012-05-05 18:54 <cedk> smarro: just wanted that you know it could be a good path
2012-05-05 18:54 <cedk> smarro: it is possible that in the coming months I will work on it
2012-05-05 18:55 <smarro> cedk: let me know if i can help you with something
2012-05-05 18:55 <cedk> smarro: for sure
2012-05-05 22:27 <cedk> yangoon: all unittest succeed (except the usual mysql failure)
2012-05-05 23:16 <yangoon> cedk: ok

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