IRC logs of #tryton for Wednesday, 2011-08-31 #tryton log beginning Wed Aug 31 00:00:01 CEST 2011
-!- mhi1( has joined #tryton00:54
-!- mhi1( has joined #tryton01:05
-!- ikks(~ikks@ has joined #tryton02:11
-!- mhi1( has joined #tryton03:32
-!- alimon(~alimon@ has joined #tryton04:49
-!- hoRn( has joined #tryton06:38
-!- okko1( has joined #tryton07:28
-!- bechamel( has joined #tryton08:13
hoRnbechamel: Good Morning08:14
bechamelhoRn: good morning08:15
hoRnbechamel: still trying json-rpc with a coffee in my hands08:15
bechamelhoRn: and it works ?08:16
hoRnbechamel: s.model.res.user.get_preferences(user_id, session, True, {}) works ;)08:17
hoRnbechamel: but when accessing models with s.model.product.product.method i get an error08:18
hoRnbechamel: __init__() takes exactly 3 arguments (362 given)08:19
bechamelhoRn: :)08:19
hoRnbechamel: am i dumb?08:19
bechamelhoRn: probably you forgot [] around ids or something like that08:20
bechamelhoRn: is your context a string or a dict ?08:21
hoRnbechamel: dict08:22
bechamelhoRn: for debugging rpc what I used to do is to put a print of args kwargs around line 153 in trytond/dispatcher.py08:22
bechamellike that I can see what the server receive08:22
hoRnbechamel: ok08:23
bechameland compare with the call made by the gtk client08:23
hoRnbechamel: no idea08:30
bechamelhoRn: you don't see anything strange server side ?08:31
hoRnbechamel: only code 400, message Bad request syntax - i read that ist the first try with ssl08:32
bechamelhoRn: yes the server does auto-detection08:32
bechamelhoRn: paste the full traceback on a pastebin08:32
-!- vladimirek( has joined #tryton08:33
hoRnbechamel: of the ssl-error?08:33
bechamelhoRn: not the "__init__() takes exactly 3 arguments (362 given)"08:34
hoRnbechamel: sorry08:35
hoRnbechamel: the __request ist taken from tryton client08:37
-!- okko1(~okko@ has joined #tryton08:37
bechamelhoRn: isn't the error comming from " Fault(*response['error'])" -> the * before the string expand it08:39
hoRnbechamel: ok08:42
hoRnbechamel: reading code always helps08:42
hoRnbechamel: will debug it with the complete error from server08:43
-!- ralf58_( has joined #tryton08:48
-!- pjstevns( has joined #tryton08:50
hoRnbechamel: that was really dumb - json needs user_id and session as first arguments08:52
bechamelhoRn: just like user.get_preferences :)08:53
hoRnbechamel: need to hack your server for deleting this irc-log08:54
bechamelhoRn: .. and  the backup copy08:54
hoRnbechamel: or i change my identity - its a bit faster08:56
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:16
hoRnjson: 1924 Products in 46 sec09:20
hoRnproteus: 1924 Products in 29 sec09:20
cedkhoRn: what are you reading on those products?09:21
hoRnbechamel: simple search_read with id > 009:22
cedkhoRn: but which fields?09:22
hoRncedk: all fields09:23
cedkhoRn: that's a bad idea09:23
cedkhoRn: you should read only what you need09:23
hoRncedk: its only for checking the possibilities for connection our shopsoftware directly to tryton09:24
cedkhoRn: yes but if you get a Function fields that is not performant than you can not deduce anything of your test09:24
hoRncedk: ok - thats reasonable09:25
cedkhoRn: make just first a test by reading only name for example09:26
hoRncedk: reading only one field: json: 1924 Products in 2.4932539463 sec09:34
hoRnproteus: 1924 Products in 0.944680929184 sec09:34
cedkhoRn: this sounds more normal09:35
hoRncedk: I espected json faster than xml-rpc09:36
cedkhoRn: it is proteus with xml-rpc or with trytond09:36
bechamelhoRn: me too09:36
cedkhoRn: what is the code of proteus?09:37
hoRncedk: proteus with xml-rpc09:37
hoRnconn = config.XmlrpcConfig('xxx')09:37
hoRn Model.get(xxx, conn).search_read()09:38
cedkhoRn: and jsonrpc?09:40
hoRncedk: the complete from tryton09:41
cedkhoRn: ok so you have the login part09:46
cedkhoRn: I think it is the diff. you get some more request with jsonrpc09:47
hoRncedk: ok - that was only for compraring the possibilities09:48
-!- elbenfreund( has joined #tryton10:08
-!- pjstevns( has joined #tryton11:42
hoRncedk: ping11:44
cedkhoRn: pong pong11:44
hoRncedk: sorry11:44
hoRncedk: i was looking in the code and printing some queries. the clause generated from reduce_ids slows down a query from 11ms to 311ms. but i finally don't understand all the mechanism of the involved methods: why we need to reduce the ids given in read?11:46
-!- nicoe( has joined #tryton11:47
-!- ccomb( has joined #tryton11:55
-!- ccomb( has joined #tryton12:10
hoRncedk: sorry - my mistake again. didn't comprare teh right values12:17
cedkhoRn: normally reduce_ids speeds up the queries because it reduces the length of the query and also the database can easily find better query plan12:18
hoRncedk: i was wrong - the timelag comes from an other param12:19
-!- zxq9( has joined #tryton12:25
-!- ikks(~ikks@ has joined #tryton12:35
-!- ndn_pit(~ndn_pit@ has joined #tryton12:45
ndn_pithi! can i get selected One2Many records?12:48
hoRnndn_pit: like widget=selection?12:50
hoRnndn_pit: no - this is Many2one12:51
ndn_pitno, i mean in form i have One2Many field, and in that field i have several records... how can i get access to "selected" records?12:51
hoRnndn_pit: don't know12:52
-!- ndn_pit(~ndn_pit@ has left #tryton12:54
-!- ndn_pit(~ndn_pit@ has joined #tryton12:54
cedkndn_pit: you can't12:55
ndn_pitit's bad :(12:55
cedkndn_pit: no, I think it is because you try to do something the wrong way12:56
ndn_piti wand to do some actions to several records at once, why it wrong way? some times it easy than do it for every record individually...12:59
hoRnndn_pit: this you can do with a wizard12:59
hoRnndn_pit: example here:13:00
cedkndn_pit: you must do it on a view with the records instead of in one2many view13:00
cedkone2many widget is a representation of a field not a set of records13:01
hoRnndn_pit: thats true - in the tree view: Invoice batch action13:02
hoRnndn_pit: dont have a repoview - so I take the one from paul13:03
hoRnpjstevns: is it ok?13:03
ndn_pitbut how can i choose special records?13:06
hoRnndn_pit: in the treeview  can select them in the standard view13:07
hoRnndn_pit: standard way i mean13:08
pjstevnshoRn: be my guest13:08
-!- pjstevns( has left #tryton13:09
ndn_pitif i create wizard to child model, has it apper in parent model's form?13:09
hoRnndn_pit: you could open a new view with the domain of the current view: so you have only the entries of the child model selected, which are related to the parent model.13:13
ndn_pitok i will try... thank you13:16
-!- pjstevns( has joined #tryton13:31
-!- sharkcz(~sharkcz@2001:15c0:6747:160::7) has joined #tryton14:07
-!- okko1(~okko@ has joined #tryton14:16
-!- ndn_pit(~ndn_pit@ has left #tryton14:40
-!- dfamorato(~dfamorato@2001:470:5:630:70e4:c9ba:fec0:37aa) has joined #tryton15:31
-!- dfamorato_( has joined #tryton15:32
-!- dfamorato_(~dfamorato@2001:470:5:630:f4f2:de59:30c7:1f12) has joined #tryton15:35
-!- alimon(alimon@ has joined #tryton15:57
-!- pepeu(~manuel@ has joined #tryton16:43
-!- zodman(~zodman@foresight/developer/zodman) has joined #tryton16:49
-!- pjstevns( has left #tryton16:52
-!- zodman(~zodman@foresight/developer/zodman) has joined #tryton17:48
hoRnany example for generating dynamic columns in a view? trying this - but don't know where to insert the additional columns. my approach:18:11
hoRninserting the fields in fields_get18:11
hoRninserting the fields in default_get18:11
hoRnresult: the view opens with the additional fields - but read() isn't called. opens with a empty form ....18:11
cedkhoRn: but is search called?18:21
-!- bechamel( has joined #tryton18:22
hoRncedk: oh - i didnt think in search18:46
hoRncedk: no18:49
hoRncedk: but i think this is not the right way - what ist the flow generating a view? fields_get - default_get - fields_view_get - read?18:51
cedkhoRn: don't know it depends of the flow18:52
-!- lem0na(~lem0na@ has joined #tryton19:42
-!- plantian( has joined #tryton20:02
-!- elbenfreund(~elbenfreu@2001:6f8:1c1b:1a18:221:5cff:fe7e:538b) has joined #tryton20:11
-!- pjstevns( has joined #tryton20:27
-!- pjstevns( has left #tryton20:27
-!- gremly(~gremly@ has joined #tryton21:28
-!- okko1( has joined #tryton21:47
-!- cheche(cheche@ has joined #tryton22:15
-!- elbenfreund( has joined #tryton22:53

Generated by 2.11.0 by Marius Gedminas - find it at!