IRC logs of #tryton for Monday, 2011-11-28

chat.freenode.net #tryton log beginning Mon Nov 28 00:00:01 CET 2011
-!- plantian(~ian@c-67-169-72-36.hsd1.ca.comcast.net) has left #tryton00:12
grasbauercedk: good morning. have you got a minute to give me a hint?09:33
cedkgrasbauer: yeps09:35
grasbauercedk: http://codereview.tryton.org/179002/diff/7002/product.py#newcode20 - id don't find a hook to do it better - tried fields_get - but there the pyson is already encoded ....09:37
cedkgrasbauer: what I mean is that you can not modify the fields of Template in Product09:40
grasbauercedk: ah - ok.09:41
cedkgrasbauer: anyway, I think it will be simplier and better to have such things in product module09:41
grasbauercedk: in the generic product module?09:41
grasbauercedk: the product.template states should be defined in the generic - i agree ...09:42
cedkgrasbauer: yes09:43
grasbauercedk: where I can find a example for checking the pyson on a field and adding a09:48
grasbaueroops09:48
grasbauercedk: Is there an example to extend the pyson on a field? Because all fields of template are having already readonly in case of not active ...09:49
grasbauercedk: in __init__ the states is a pyson-object - in fields_get a string - so I don't know where to extend it properly09:53
cedkgrasbauer: it is in __init__09:53
grasbauercedk: ok09:54
cedkgrasbauer: http://hg.tryton.org/modules/company/file/46b8745615a4/party.py#l1509:54
grasbauercedk: ok - this I know. But this implies to know the name of the field. But to be generic here I have to manipulate all possible fields - from unknown extensions as well ...09:57
cedkgrasbauer: I think this is not doable09:59
cedkgrasbauer: because your code will not necessary be the last one09:59
grasbauercedk: thats why i thought that manipulating _inherit_fields is more save - because product.product is called always after product.template10:03
cedkgrasbauer: not always10:04
cedkgrasbauer: but we have it in the base module that not a problem10:04
grasbauercedk: and dumb setting all fields readonly inherited from template in fields_get in product.product isn't a proper way as well?10:08
grasbauercedk: because I don't want to change the behavior of the fields - its more about prevent editing fields of the template accidentally (in sense of usabillity)10:10
cedkgrasbauer: it must be done in base module or not10:12
cedkgrasbauer: I'm not against not having it10:12
grasbauercedk: ok - so the conclusion seems that product variant isn't a extension of the base module - its part of the base modules?10:14
cedkgrasbauer: no10:16
grasbauercedk: ok. so I don't have a conclusion for me yet :-/ I understand already: manipulating the fields of product.template must be done in the __init__ of product.template. There I have no information about the fields that the module already has (or only self._columns) - so, last try: can I manipulate the states in self._columns?10:28
cedkgrasbauer: yes but it is not sure that you will have all the fields10:29
grasbauercedk: ok - because a extension loaded after product_variants can add additional fields to product.template as well, right? so the extender needs to take care for himself ;)10:32
cedkgrasbauer: yes10:34
grasbauercedk: ok, thanks. I'll start ...10:35
ciupicricedk, is it to me or you've worked at an integration of tryton with satchmo?10:57
cedkciupicri: it is not me10:58
ciupicriok10:58
-!- ndn_pit(~ndn@2.132.97.137) has left #tryton11:54
ciupicriI'm using tryton-2.0.2-1.fc16.noarch and trytond-2.0.2-1.fc16.noarch along with PostgreSQL. How can I use an already existing database that's empty?14:58
cedkciupicri: what do you mean?15:03
cedkciupicri: fill an existing database?15:03
ciupicricedk, I have already create a database named tryton15:03
ciupicriit's empty, but the tryton user can do whatever it wants with it15:04
cedkciupicri: trytond -d <databasename> -i all15:04
ciupicrilet me try it15:04
ciupicrithe client says "incompatible version of the server"15:06
cedkciupicri: strange15:12
cedkciupicri: perhaps an IPv6 issue15:12
ciupicriunrelated I think: /usr/lib/python2.7/site-packages/tryton/common/common.py:1108: GtkWarning: GtkEntry - did not receive focus-out-event. If you connect a handler to this signal, it must return FALSE so the entry gets the event as well   gtk.main_iteration()15:15
cedkciupicri: unrelated and fixed in trunk15:16
ciupicriok; what about this one? "Traceback (most recent call last): File "/site-packages/tryton/gui/window/dblogin.py", line 245, in edit_profilename     oldname = model[path][0] IndexError: could not find tree path"?15:17
ciupicriit happened while trying to add another profile15:17
cedkciupicri: looks the same as https://bugs.tryton.org/issue229215:19
ciupicriyes, you're right15:20
ciupicrips shows me /usr/bin/python /usr/bin/trytond --config /etc/trytond.conf --pidfile=/var/lib/trytond/trytond.pid --logfile=/var/log/trytond/trytond.log -d tryton -i all . Is this correct?15:21
ciupicrithe tables seems to have been created15:23
cedkciupicri: it looks but you must run it only once15:24
ciupicriohh15:24
ciupicricedk, is there a way to specify the admin password for tryton when initializing the database? I'm trying to automate this step by running a command under puppet.15:30
cedkciupicri: no15:32
ciupicri /etc/trytond.conf has an admin_passwd and trytond --help doesn't show any parameter..15:32
ciupicriI see15:32
cedkciupicri: the admin_password is for managing database via the client15:32
oxcarHi, I have a doubt, Is json-rpc more fast that xml-rpc for transactions?15:46
cedkoxcar: what do you mean?15:48
oxcarHi, I have a doubt, Is json-rpc faster that xml-rpc for doing transactions?15:51
cedkoxcar: what do you name transaction?15:52
oxcarOk, transactions not, the calls15:54
cedkoxcar: there is a lot of thing to take into account15:54
cedkoxcar: network speed, cpu etc.15:55
cedkthe size of the message is very smaller with json than xml15:55
oxcarah, ok.15:56
ciupicriis this backtrace http://fpaste.org/XdJ1/ a known bug?16:14
cedkciupicri: it looks like you are entering a wrong RO vatnumber16:18
ciupicriyeah, it had a space at the end, but nevertheless it shouldn't display that ugly backtrace16:18
ciupicrierr traceback16:19
ciupicriwhat's with this error "Calling method create on model party.check_vies.check is not allowed!"?16:49
cedkciupicri: it looks like a strange wrong method name16:52
cedkciupicri: about vatnumner, fill an issue on vatnumber bugtracker17:08
-!- pjstevns(~paul@a83-163-46-103.adsl.xs4all.nl) has left #tryton17:17
ciupicricedk, unfortunately I have no idea how I managed to trigger it17:18
grasbauercedk, udono: now I need 3 weeks holidays - it's to hard for me to manage the relations of to models which are inherited each from the other ...17:53
-!- udono(~udono@ip-109-91-208-150.unitymediagroup.de) has left #tryton18:07
udonograsbauer: keep cool, imho you are doing a good job. Hopefully I solve all my 2.2 migration problems soon and come back to test product_variant19:31
seba1Hi, is anyone here familiar with json-rpc 2.2 ?19:40
seba1in version 2.219:40
udonoseba1: hi, just ask your question, we will see if someone is familiar with json-rpc :-)19:52
seba1okay :)20:01
seba1i'm trying to do a "modelstorage".search() json-rpc call20:01
seba1and i sniffed the structure of this pretty much from a tryton to trytond connection20:02
seba1but i cant seem to figure out why the method always fails as soon as i dont keep 1:1 to the sniffed domain20:03
seba1so, does the method really needs all the timezone, locate, language, groups parameters?20:04
udonoseba1: I am not so familiar with json-rpc, but from xmlrpc I know, tryton always needs a context for each request.20:18
udonoseba1: But why you need such a low level communication? Did you try trytond as a moduleor proteus?20:19
udonoseba1: or even proteus-js?20:20
seba1no i didnt tried it yet20:20
seba1the thing is, that i'm not developing in javascript, but java20:22
udonoseba1: Do you have jython available?20:23
seba1yep :)20:25
seba1do you think it is easier/more efficent to do the rpc in phyton?20:25
seba1python*20:26
udonoseba1: There is maybe a chance to get proteus run on jython. But I don't know if it is possible. Proteus http://hg.tryton.org/proteus is a high level client api to tryton. Using proteus looks like this: http://hg.tryton.org/tryton-tools/file/3a30c988c7ff/tryton_demo.py20:29
seba1looks promising, i ll keep it in mind if i dont get it working with java, thanks!20:32
seba1but back to the context: what is it's purpose other then defining meta-data like thousands_seperator etc.20:33
seba1?20:33
udonoseba1: according to http://code.google.com/p/tryton/wiki/RemoteCalls the context includes the user preferences and the session. I guess it is needed because of the stateless connection. But here I am not an expert...20:41
seba1I found that example as well, but unfortunately it is for version 1.6. If you have a look at the api, you can see that 1.6's search method ( http://doc.tryton.org/1.6/trytond/doc/ref/models/models.html#modelstorage ) changed it's input parameters compared to the 2.2's one: http://doc.tryton.org/2.2/trytond/doc/ref/models/models.html#modelstorage20:46
seba1instead of: modelStorage.search(cursor, user, domain[, offset[, limit[, order[, context[, count]]]]]), it's now ModelStorage.search(domain[, offset[, limit[, order[, count]]]])20:47
seba1it is confusing, since the json-file caught in my tcp sniffing indicates, that still the "old" method is used.20:48
udonoseba1: The cursor, user, context moved to the transaction.20:52
udonoseba1: But since 1.8 I no longer use low level api like XYZ-RPC, I use always proteus to communicate with Trytond from a script.20:53
seba1i see why ;)20:53
seba1does the proteus.js works like trytond as a module?20:54
udonoseba1: it works more like a wrapper over xmlrpc.20:58
udonoseba1: but it is also a wrapper for trytond as a module.20:59
udonoseba1: depends on the connection type you choose20:59
seba1okay, thanks for your help :) i really appreciate!21:07
udonoseba1: welcome21:09
-!- seba1(~seba@mnhm-590e4c84.pool.mediaWays.net) has left #tryton22:04

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