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

chat.freenode.net #tryton log beginning Sat May 5 00:00:01 CEST 2012
bechamelcedk: I think we don't have a lot of situation where the problem arise00:00
albertcaI don't actually know how the cache is implemented but if there's a cache per transaction00:00
albertcaand a gloabl structure for all models00:00
albertca(sorry, records)00:00
cedkbechamel: this is not a valid answer :-)00:00
albertcaeach browse object should actually return the reference to the valid cache object..00:00
cedkalbertca: there is a cache on cursor and a cache on each records00:00
bechamelcedk: example: when writing a sale line, i must also call a clear method on the coresponding sale00:01
cedkbechamel: yes00:02
bechamelcedk: I mean, let's do it explicitly00:02
albertcacedk: where is the problem in the cursor or record cache?00:02
cedkbechamel: I could not always now that sale line was written00:02
cedkalbertca: record cache00:02
cedkI'm pretty sure that the right solution is what I proposed but I'm not sure about the implementation and the usage of currentframe00:04
bechamelcedk: no, but the code that write the line know that the cache on the sale must be cleared00:04
cedkbechamel: no00:04
cedkall we can have is to let to the dev to manage the local cache inside the code of one method00:05
cedkbut once outside, the cache must be cleared00:06
bechamelcedk: ok, what about an implicit decorator ?00:06
cedkbechamel: we don't now what to clear00:06
bechameland the decorator just loop on the args and clear everything that is an instance of a record00:07
cedkbechamel: and list of instances and dict with instance as value or key00:07
cedkbechamel: and anything deeply00:08
cedkbechamel: that will be too slow00:08
cedkbechamel: and pointless because we must be lazy on cleaning the cache00:08
bechamelcedk: you say "he idea will be to have an automatic clear of the cache when entering00:09
bechamelin a new method"00:09
bechameland you propose to use inspect00:09
bechamelwhat I say is: does the same cleaning but instead of using inspect, I propose to use a decorator00:10
bechamels/does/let's do/00:11
albertcaI'm getting "500 Server Error" on codereview.tryton.org00:15
cedkbechamel: what I propose is to invalidate the cache when using it, not always00:23
cedkalbertca: we got too much request today, need to wait 7h00:23
bechamelcedk: cache invalidation is cheap, it's reading the db that is expensive00:24
albertcacedk: ok, wanted to check the review to understand the problem00:24
cedkbechamel: it is not at least the way you suggest00:25
cedkalbertca: it is already there in current code00:26
cedkalbertca: but issue is not raised because we pass ids to methods instead of instance00:26
albertcacedk: ok, will take a look00:26
cedkbechamel: this has improved a lot the perfs http://hg.tryton.org/trytond/rev/3d09bdb886eb00:27
bechamelcedk: for me cache invalidation is just "record._dirty = True" or something similar00:32
cedkbechamel: yes but it is finding all records that costs00:34
bechamelcedk: anyway I don't talk about how to handle invalidation, I just want to point that instead of using inspect, we can use a decorator00:36
bechamelcedk: btw finding all the records is as easy as putting them in a dict when they are instanciated00:37
cedkyangoon: I think we can make bugfix release for <= 2.209:34
cedkyangoon: but we should first wait that the nightly unittest finished09:42
cedkyangoon: by the way, it will be good to run copyright_update.py before each release of a module09:49
yangooncedk: same idea here10:45
yangooncedk: for the copyright script: yes, I will run it, but it doesn't produce reliable results as it is10:45
cedkyangoon: why?10:46
yangoone.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 contribution10:47
cedkyangoon: as far as it use a address domain, it will be10:47
yangooncedk: I know, but this is an assumption, that won't be adequate rather often10:48
cedkyangoon: I'm really not sure10:49
yangoonand I think you are running some modification that included Bertrand sometimes, even if there was no commit from him10:49
cedkyangoon: if you don't use the company email, than you are working for your self10:49
cedkyangoon: example?10:49
yangoonbut I can be wrong about the latter, didn't check very closely10:49
yangooncedk: I can assign a copyright to my work, to whomever I want10:50
yangoonof course you cannot know by script10:50
cedkyangoon: if you don't do it in your commit nobody know10:52
cedkyangoon: so not relevant10:52
yangooncedk: so you also shouldn't do it for B2CK, because you also don't assign  especially in your commits;)10:54
cedkyangoon: I use @b2ck.com to commit10:55
yangooncedk: IMHO that is not enough to deduce copyright from it10:55
yangooncedk: it is a problem we won't solve today10:56
cedkyangoon: I don't care, if people want more, they have to do it in commit10:57
yangooncedk: all right, will try to do it this weekend10:57
__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 ?11:32
__efx__the error I get is : "The error was 'BadWindow (invalid Window parameter)'11:33
__efx__I tried to run with gdb but I got no more information11:34
udono__efx__: Hi, which os you use and which tryton version?11:44
__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 actually11:46
__efx__I mean with the previous version of kubuntu11:47
__efx__that's why I think this comes from the OS and not from tryton11:47
cedk__efx__: how do you close tab?11:48
__efx__with the small cross11:53
__efx__at the right of the tab11:53
__efx__but for example when I create a new database and connect to it a wizard appear11:53
__efx__if I cancel the wizard the client closes11:54
cedk__efx__: that's very strange11:56
cedk__efx__: do you use the strange windows manager of ubuntu?11:57
__efx__no I use kde11:57
__efx__I will try to install a minimal one like fluxbox just to try11:58
__efx__ok with fluxbox it works like a charm12:00
__efx__sad :(12:15
__efx__for sha fields does tryton use sha0 1 or 2 ?12:20
cedk__efx__: sha112:32
__efx__thank you12:35
__efx__If I want to add a complex entry (like a patient, with medication etc.. ) automatically (I mean directly from python).12:39
__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 field12:40
cedk__efx__: don't understand the question12:41
__efx__that's because of my beautiful english :D could we meet on #tryton_fr ?12:41
cedk__efx__: yes12:43
cedk__efx__: it is #tryton-fr12:50
__efx__mhh12:51
cedksmarro: hi, is it you who is working on BI?18:00
smarrocedk: yes18:01
cedksmarro: have you something to show?18:03
cedksmarro: because I had to think about it and I have some ideas18:03
smarrocedk: actually i'm working in a Flask application, that use Trytond as a server18:04
smarrocedk: to populate a new warehouse database, with the functional fields calculated18:04
smarrocedk: it uses sqlalchemy and cubes library18:05
cedksmarro: why Flask?18:05
smarrocedk: because it is light, and uses werkzeug.... but it can be any Python web framework18:06
cedksmarro: I mean what is the usage of Flask?18:08
smarrocedk: I use Flask-admin, to define the cubes, measures, dimensions, etc... and the templates to show last migrated datetime, for models18:09
smarrocedk: and templates to drill in the dimensions and show statistic (just beggining)18:10
cedksmarro: why not Tryton?18:10
cedksmarro: because my idea was to define a Model that inherit ModelStorage that will query cubes18:11
smarrocedk: first idea was to use Tryton, to define cubes, dimensions... i have the code of that olap module18:11
smarrocedk: but, then i thought that maybe is better to define the cubes in the same application that is going to work with them18:12
cedksmarro: I personnaly think defining cubes is a dev job18:13
cedksmarro: but I was talking about showing result with the Tryton client18:13
smarrocedk: i think that an advanced technical user, can do that job18:13
smarrocedk: ah, ok... no i wasn't worked with that18:14
cedksmarro: have you example of cubes definition?18:15
smarrocedk: because the idea to use the Tryton operational db to query, is not a good idea18:15
smarrocedk: i'm sending you the module18:15
cedksmarro: I don't want to use the operational DB18:15
smarrocedk: ok18:15
cedksmarro: just the client and the server18:16
cedksmarro: you don't have a public repo?18:16
smarrocedk: i can upload... give me a couple of minutes18:17
smarrocedk: https://bitbucket.org/smarro/tryton_olap18:25
smarrocedk: it's just a test  ;-)18:26
cedksmarro: ok but what is Schema?18:37
smarrocedk: it's an idea taken from http://mondrian.pentaho.com/documentation/schema.php#What_is_a_schema18:38
smarrocedk: my first idea, was to generate a xml file for mondrian18:38
cedksmarro: ok because it doesn't exist in cubes18:39
smarrocedk: no, that module is before cubes18:39
cedksmarro: so why not storing model.json in the database18:43
cedksmarro: even if I'm not really sure about that18:43
smarrocedk: http://pastebin.com/YNZyQ1Br is with cubes18:43
cedkany, it is just details18:44
cedklet's say we have a cubes server running18:45
cedkmy idea is to browse it via the Tryton client18:45
smarrocedk: sounds good18:46
cedksmarro: because browsing could be seen just as a treeview18:47
cedksmarro: so I think it can be managed with the current API, with a view_get generated on the fly18:48
smarrocedk: yes... like albert did with babi18:48
cedkdepending of the dimension browsed18:48
cedksmarro: don't know, I never saw babi18:49
smarrocedk: i saw the screenshots18:49
smarrocedk: i mean, about the use of a treeview18:49
smarrocedk: browse cubes with Tryton client... that would be great!18:51
cedksmarro: just wanted that you know it could be a good path18:54
cedksmarro: it is possible that in the coming months I will work on it18:54
smarrocedk: let me know if i can help you with something18:55
cedksmarro: for sure18:55
cedkyangoon: all unittest succeed (except the usual mysql failure)22:27
yangooncedk: ok23:16

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