IRC logs of #tryton for Tuesday, 2010-11-16

chat.freenode.net #tryton log beginning Tue Nov 16 00:00:04 CET 2010
-!- tony__(~tony@116.233.246.78) has joined #tryton01:34
-!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton03:04
-!- trifon(~trifon@91-67-144-158-dynip.superkabel.de) has joined #tryton04:44
-!- trifon(~trifon@91-67-144-158-dynip.superkabel.de) has joined #tryton04:52
-!- trifon(~trifon@91-67-144-158-dynip.superkabel.de) has joined #tryton05:17
-!- yangoon(~mathiasb@p549F64A5.dip.t-dialin.net) has joined #tryton05:22
-!- sdistefano(~sdistefan@125.24.36.219.adsl.dynamic.totbb.net) has joined #tryton06:26
sdistefanohi everyone ; if I need to add a field to an existing model, what's the easiest way to do that06:26
-!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton08:49
-!- Red15(~red15@unaffiliated/red15) has joined #tryton09:05
sdistefanoI'm getting hangs on the client now if I try to add a new record after I extended the model09:12
sdistefanoeven removing the extension doesn't seem to help ; client will hang and I get NameError: name 'company' is not defined09:13
sdistefano if I try to do it trough the API ; any ideas?09:13
-!- ecarreras(~under@unaffiliated/ecarreras) has joined #tryton09:25
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:31
-!- pjstevns(~pjstevns@a83-163-46-103.adsl.xs4all.nl) has joined #tryton09:37
-!- paepke(~paepke@p4FEB03EF.dip0.t-ipconnect.de) has joined #tryton09:39
-!- Timitos(~kp@88.217.184.172) has joined #tryton09:48
-!- trifon(~trifon@91-67-144-158-dynip.superkabel.de) has joined #tryton09:48
-!- paepke(~paepke@p4FEB03EF.dip0.t-ipconnect.de) has left #tryton09:56
-!- gordon_geeko(~jeroen@212.147.120.127) has joined #tryton10:34
-!- bechamel(~user@chimie-prtx11.scf.fundp.ac.be) has joined #tryton10:55
gordon_geekois it possible to get the cursor and user in __init__ of a model?11:00
cedkgordon_geeko: no11:01
cedkgordon_geeko: __init__ is independant of the database11:01
cedkgordon_geeko: what do you want to do?11:01
gordon_geekocedk: set a field domain filter upon initialization11:02
gordon_geekocedk: based on a function11:02
gordon_geekocedk: i was looking at doing a copy of field and setting domain via field.domain.append11:03
cedkgordon_geeko: based on which function?11:04
gordon_geekocedk: custom for returning a list of ids from another object11:04
-!- pjstevns(~pjstevns@a83-163-46-103.adsl.xs4all.nl) has joined #tryton11:05
cedkgordon_geeko: need to get more informations but I guess you can do it with dynamic domain (PYSON)11:07
gordon_geekocedk: something like is done in _action_open_reconcile_lines of move.py?11:10
cedkgordon_geeko: i think you must create a function field on the target model that will be used for domain constraint11:18
-!- paepke(~paepke@p4FEB03EF.dip0.t-ipconnect.de) has joined #tryton11:22
gordon_geekocedk: is tryton.org down?11:34
cedkgordon_geeko: I'm updating glibc for security11:39
gordon_geekocedk: ah...11:40
-!- tony__(~tony@116.233.246.78) has joined #tryton11:40
-!- irclog(~irclog@tycho.b2ck.com) has joined #tryton11:54
cedkgordon_geeko: back11:56
cedkI think I will need to stop hg and roundup to process the update11:57
cedkI will do it this night11:57
gordon_geekocedk: the function fields used in a domain must be in the view?12:21
cedkgordon_geeko: you must put in depend of the field12:25
-!- heg(~heg@dyn.83-228-165-075.dsl.vtx.ch) has joined #tryton12:47
-!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton12:55
lem0nacedk: found some duplicates on tryton.pot -> #: tryton/gui/window/dbcreate.py:30 and #: tryton/gui/window/dbcreate.py:182 tryton/gui/window/dbdumpdrop.py:135, #: tryton/gui/window/dbrestore.py:8913:44
yangoonlem0na: probably not duplicates, but multiple occurencies13:45
lem0nayangoon: yes - but i think they should be grouped in one resource13:46
lem0nayangoon: or am I wrong?13:46
yangoonlem0na: same occurrence doesn't necessarily mean same meaning13:47
yangooncould be that you need differentiated translation for some language13:47
lem0nayangoon: http://pastebin.com/PAMWsbCZ13:49
lem0nayangoon: the diffrence in one word but the meaning is the same13:49
yangoonlem0na: yes, they are the dialogs resp. in dbcreate and dbrestore13:51
lem0nayangoon: did they do not mean the same thing?13:51
yangoonthe software cannot know if the meaning of the same sentence is always the same13:51
yangoonexample: sequence13:52
yangooncan be in german: Sequenz, Reihenfolge, Nummernkreis13:52
yangoonso you must have the possibilty to translate each single one13:53
lem0nayangoon: maybe i am worng - i thing this two msgid's meant the same and can be combined13:53
yangoonlem0na: could be13:54
gordon_geekowhat am i missing when i use a function field in a domain and get the error "function object at ... is not JSON serializable"?13:54
lem0nayangoon: and about seaquence - i realase that i have forgotten german - have not speak it over 20 years :(13:54
cedkgordon_geeko: copy/paste the code somewhere13:59
-!- johbo(~joh@statdsl-085-016-072-173.ewe-ip-backbone.de) has joined #tryton14:03
sdistefanoI'm trying to change a view - without success. I could modify the model fields but my XML seems to be ignored14:04
sdistefanois         <record model="ir.ui.view" id="party_view_tree"> in my custom module not enough?14:05
cedksdistefano: copy/paste the xml in soem website14:05
sdistefanosorry!14:06
sdistefanohere it is http://pastebin.com/hWV8Hvnr14:06
cedksdistefano: you must use xpath syntax in CDATA part14:08
sdistefanocedk: it's tryton 1.4 ; and I copied it from the party.party module14:09
cedksdistefano: like http://hg.tryton.org/modules/account/file/b5bdbac9d33b/party.xml#l1314:09
gordon_geekocedk: http://dpaste.com/275944/14:09
sdistefanois that valid for 1.4?14:10
cedksdistefano: yes14:10
cedkgordon_geeko: this should work http://dpaste.com/275945/14:11
sdistefanocedk: still no change ; but I understand now, I'm trying to use a field that is in the addresses one2m14:12
sdistefanocedk: is it possible to use the output a function there? so that I can take the first address and display the info I need14:12
cedkgordon_geeko: be carefull that it is not good to store data on Model like you do with _current_periods14:12
cedksdistefano: for city?14:13
sdistefanocedk: yes14:14
cedksdistefano: you can see http://hg.tryton.org/modules/party/file/a13f851848ad/party.py#l5614:14
cedkgordon_geeko: you can use the Cache decorator14:16
sdistefanocedk: I don't understand14:16
sdistefanooh sorry wrong line14:16
sdistefanoI do understand14:16
gordon_geekocedk: thx for the tips, but adding the Eval still gives the TypeError14:17
cedkgordon_geeko: yeps, I forget the default value http://dpaste.com/275948/14:18
sdistefanocedk: Dont, but still doesn't work ; no error msg either, just ignored14:19
cedksdistefano: I don't understand14:21
sdistefanocedk: My new field on the view parties table is not there14:21
-!- tony__(~tony@116.233.246.78) has joined #tryton14:26
cedksdistefano: did you define the xml in the __tryton__.py14:28
sdistefanocedk: I did14:29
gordon_geekocedk: thx, no more error - but it seems the function is never called14:30
cedkgordon_geeko: depends must be list of string http://dpaste.com/275952/14:32
cedksdistefano: coudl you copy/paste last version of xml?14:32
sdistefanocedk: http://pastebin.com/a63xd3PV14:33
cedksdistefano: strange did you run a database update after change?14:35
sdistefanocedk: no ; thought it wasn't needed after adding a function14:36
sdistefanocedk: did it now14:37
sdistefanocedk: still not there14:37
cedksdistefano: this is strange14:38
Timitoscedk: i also noticed things like this. it seems that it does not work in all cases14:38
cedksdistefano: do you see your view in the admin menu14:38
sdistefanocedk: I'm trying to modify an existing view14:38
Timitoscedk: maybe it has to do with another module that extends the view too or something like that14:38
sdistefanocedk: the one that comes with Tryton's party module14:38
sdistefanocedk: and I'm checking the main list of Parties tryton has14:39
-!- enlightx_(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton14:39
cedksdistefano: but I want to ensure that the view record is in the database14:40
Timitoscedk: in my case i saw the view in the admin view but it was not used. but the case was a little bit different. i tried to extend a view that was created by extension itself14:40
cedkTimitos: this is not a feature14:40
sdistefanocedk: what would the view name be?14:40
sdistefanocedk:  I'm using party_view_tree whch was always there14:41
sdistefanocedk:  should I use something else? ... I'm trying to monkey patch teh existing view, that was my though14:41
Timitoscedk: you mean: this is not possible? ok14:42
-!- gremly(~gremly@200.106.202.91) has joined #tryton14:44
cedkTimitos: yes inherit only work on non-inherit view14:45
cedksdistefano: there is no name on view14:46
sdistefanocedk: I mean i14:46
sdistefanoid14:46
Timitoscedk: i had a case where i needed to extend a view at a field position i could only define with fields i already added by a inherit view. i something like this possible?14:47
cedksdistefano: it is not deterministic14:49
cedkTimitos: yes14:49
Timitoscedk: it did not succeed when i tried this. maybe i need to play around with priority?14:50
sdistefanocedk: how do I find the view on the database then ; how can I identify it?14:50
cedksdistefano: search by model14:52
sdistefanocedk: not there14:52
sdistefanocedk: sorry, it IS there14:54
cedksdistefano: so it is strange14:57
cedksdistefano: no error message on server log?14:58
-!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton14:58
sdistefanocedk: just got one!14:58
sdistefanocedk: http://pastebin.com/sHdEutV114:58
cedksdistefano: it seems you did not correctly define function field15:00
udonosdistefano: how do you define 'city'on party?15:00
sdistefanocedk: city = fields.Function(fields.Char('city'), 'get_mechanism')15:00
udonosdistefano: is the *.py file imported in __init__15:01
sdistefanoudono: it is15:02
udonosdistefano: may you paste the class where you define the above Function field (incl. get_mechanism)?15:03
sdistefanoudono: http://pastebin.com/3gtjEcUR15:04
udonosdistefano: so you need a method for 'get_mechanism'... def get_mechanism(): ...15:05
sdistefanoudono: d'oh! I thought it came with the base class15:07
sdistefanoudono:  sec15:07
udonosdistefano: but there is already a def get_mechanism on party.party.15:07
udonosdistefano: so better not overwrite it. Maybe write an own getter like 'get_city' or 'get_first_address_city'15:08
udonosdistefano: yas, it comes with the base_class, but you need a getter, which provides a string, because fields.Char expect it (city = fields.Function(fields.Char...)15:09
sdistefanoudono:  tried http://pastebin.com/GZfxpnqJ15:10
sdistefanosame error15:10
gordon_geekocedk: the function fields are never called!15:11
udonosdistefano: is it on a new database too?15:12
sdistefanoudono: relatively new tryton 1.415:13
udonosdistefano: Tryt to create a new database with your module. Sometimes it helps in development.15:14
cedkgordon_geeko: did you fix also global_periods?15:14
sdistefanoudono: ok, I can't try that right now ; but I have  a few more questions about tryton in general15:15
sdistefanoudono: do you have 5 mnutes?15:15
udonosdistefano: just ask15:15
gordon_geekocedk:yes, http://dpaste.com/275963/15:16
sdistefanok ; 1) if I want to remove fields from a view with my override, how do I do that?15:16
udonosdistefano: with xpath. But pay attention if they are required15:16
sdistefanoudono: but in the list view it wouldn't matter, right?15:17
-!- trifon(~trifon@p4FFB881D.dip0.t-ipconnect.de) has joined #tryton15:17
udonosdistefano: They are handled separated, see gordon_geeko s paste http://pastebin.com/a63xd3PV he adds a field in a tree view...15:18
udonosdistefano: sorry, was your paste...15:19
cedkgordon_geeko: I don't see. Could you try by putting the fields in the view15:19
udonosdistefano: for each view id you need to define your modifications.15:20
sdistefanoudono: ok thanks15:20
sdistefanomy next question is much more ambitious15:20
gordon_geekocedk: i did. they're also empty15:20
sdistefanowe will need CRM features in the future ; especially being able to store e-mails so that sales people can see the entire e-mail history with any client15:21
sdistefanodisplaying attachments and allowing to send e-mail as well would be desirable but not critical ; how feasible does this sound?15:21
cedkgordon_geeko: but it is called?15:22
gordon_geekocedk: not once...15:23
cedksdistefano: there is http://code.google.com/p/tryton/wiki/EmailIntegration15:23
cedkgordon_geeko: don't you have duplicate methods?15:24
sdistefanowill that also have a UI to see e-mail within tryton?15:24
gordon_geekocedk: those 2 are nearly identical, but the only ones in the class15:25
udonosdistefano: I guess there will be some simple view in Tryton for emails like we have for calender. But in general we do not try to mimic already existing applications.15:27
cedksdistefano: we thought about implementing a IMAP server15:27
cedkgordon_geeko: so it is very strange15:27
sdistefanoSure, I don't want an e-mail client ; just a way for people to see what e-mails anyone has sent before15:28
sdistefano(in a central location) ; is this in active development? When is it expected to be ready?15:28
udonosdistefano: afaik sharoon is working on this. I do not know when it is finished.15:29
sdistefanoI see15:30
sdistefanoby the way, I fixed the problem ; it's just that in 1.4 the Function system is completely diffeerent15:31
bechamelgordon_geeko: I don't see any "Move()" at the end of http://dpaste.com/275963/, is it missing in your code or in the paste ?15:31
udonosdistefano: ouch, sorry have not recognized that you used 1.415:31
gordon_geekobechamel: no, i only pasted the first part15:34
sdistefanoI see ; one minor thing is that there is no label for it on the list15:35
-!- paepke(~paepke@p4FEB6DFD.dip.t-dialin.net) has joined #tryton15:35
sdistefanoany quick fix forthat?15:35
cedksdistefano: string="..."15:36
sdistefanobrilliant ; oh last thing15:36
sdistefanohave you ever discussed integrating with something like SQLAlchemy?15:36
gordon_geekook, i messed things up - i upgraded the client to 1.6.1 but not the modules...15:37
cedksdistefano: I started to analyse the possibility15:37
sdistefanocedk: sorry, string= seems to be only for <tree, not <field in 1.415:38
sdistefanoI see all other fields just have name="" and get a label15:38
cedksdistefano: in the function field15:41
sdistefanoyes!15:42
sdistefanothanks a lot15:42
-!- gavinf(~gavinf@196-215-106-210.dynamic.isadsl.co.za) has joined #tryton15:56
-!- gavinf(~gavinf@196-215-106-210.dynamic.isadsl.co.za) has left #tryton15:57
-!- tony__(~tony@116.233.246.78) has joined #tryton16:00
-!- pheller(~pheller@c1fw231.constantcontact.com) has joined #tryton16:29
-!- heg(~heg@dyn.83-228-165-075.dsl.vtx.ch) has joined #tryton16:38
-!- heg(~heg@82-248.62-188.cust.bluewin.ch) has joined #tryton16:58
-!- heg(~heg@dyn.83-228-165-075.dsl.vtx.ch) has joined #tryton17:17
-!- pepeu(~manuel@201.155.193.192) has joined #tryton17:24
-!- zodman(~andres-va@200.67.176.253) has joined #tryton17:24
-!- pjstevns(~pjstevns@a83-163-46-103.adsl.xs4all.nl) has left #tryton17:24
-!- rednul_(~rednul@host-174-45-250-246.bln-mt.client.bresnan.net) has joined #tryton17:41
phellerI've forgotten, is there a way to invoke trytond such that it logs xmlrpc calls?  I don't immediately see anything in the code for it, but for some reason I remember using this (maybe on OE)17:57
-!- johbo_(~joh@statdsl-085-016-072-173.ewe-ip-backbone.de) has joined #tryton18:41
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton19:08
-!- gordon_geeko(~jeroen@77-56-129-131.dclient.hispeed.ch) has joined #tryton19:10
cedkgordon_geeko: is it working now?19:15
phellerif I get a user object with proteus, how can I get its view_type, view_mode, etc....19:21
phellere.g.,  demo = User.find(..... 'demo')[0], then user.action is a reference to an ir.action "Menu"19:22
cedkpheller: and so?19:22
phellercedk: the resultant user.action doesn't seem to contain variables like "view_modes", "view_type", etc....19:23
cedkpheller: you must read the right Model depending of the type19:24
phellercedk: ah ok, and menu doesn't have these variables.19:24
phellerI see19:24
cedkpheller: you got an ir.action which could be an act_window, report, wizard etc.19:25
phellercedk: right...  I'm trying to work through converting the OE text mode client, and how they handle a menu is not yet entirely clear to me.19:25
phellercedk: I'll get it eventually :)19:25
cedkpheller: good news19:29
cedkpheller: I think one first thing could be to split it in many files :-)19:29
cedkpheller: it is one main usage of proteus19:30
-!- trifon(~trifon@91-67-144-158-dynip.superkabel.de) has joined #tryton19:34
-!- chrue(~chrue@host-091-097-080-143.ewe-ip-backbone.de) has joined #tryton19:51
-!- plantian(~ian@c-69-181-194-95.hsd1.ca.comcast.net) has joined #tryton20:23
-!- enlightx(~enlightx@dynamic-adsl-94-34-180-227.clienti.tiscali.it) has joined #tryton20:33
phelleranyone know which object will have the "fields_view_get" method within proteus?20:37
udonopheller: in tests/test_tryton.p it is called like this: res = model_obj.fields_view_get(view_id) maybe this helps?!20:50
phellerudono: yes, but I'm trying to figure out what type of object "model_obj" is.20:55
cedkpheller: the method is on every Model20:57
phellerhmmh, I don't see it with dir(object) in proteus....  perhaps there is no object introspection through the proxy?20:58
phellercedk: ok ok, it is closer to working now...21:01
phellercedk: i make a call like obj.fields_view_get([])21:01
phellercedk: but I get a traceback..21:02
pheller  File "/Volumes/Data/Users/pheller/Projects/tryton/server/trunk/trytond/model/model.py", line 644, in fields_get21:02
pheller    language = Transaction().context.get('language') or 'en_US'21:02
phellerAttributeError: 'list' object has no attribute 'get'21:02
udonopheller: it looks like it expected one id21:05
phellerudono: ok, I just print Transaction().context in the server before this traceback, and the context is an empty list, rather than a dictionary21:08
phellerudono: d'oh.  my mistake21:10
-!- Timitos(~kp@88.217.184.172) has joined #tryton21:37
cedkpheller: I think I will improve "classmethod" call in proteus21:39
-!- pepeu(~manuel@201.152.0.221) has joined #tryton21:42
-!- sdistefano(~sdistefan@125.24.36.219.adsl.dynamic.totbb.net) has left #tryton22:13
-!- trifon(~trifon@91-67-144-158-dynip.superkabel.de) has joined #tryton22:19
phellerok, modifying this text mode client is an endeavor that will take more than a few hours :-)22:28
cedkpheller: you should perhaps just draw from22:37
phellercedk: yes, I think that is probably a better idea...22:37
cedkpheller: one secret goal will be to have any GUI lib client built on top of proteus22:42
cedkpheller: this will include the GTK one22:42
phellercedk: that is a perfect goal, I think22:42
phellercedk: same for the web client?22:43
cedkpheller: when pyjamas will be strong enough22:43
phellercedk: so the other webclient that had been started will not go any further then?22:45
phellercedk: it will be done instead with pyjamas?22:45
-!- lem0na(~lem0na@84.40.71.19) has joined #tryton22:45
cedkpheller: no, I think right now GWT is the best choice22:46
cedkpheller: pyjamas is just a port of GWT from Java to Python22:46
cedkpheller: so it will not be a big deal to migrate later22:47
phellercedk: ah, ok, I see.  how far along is the gwt initiative?22:47
cedkpheller: pyjamas guys have script to convert Google Java code into Python22:47
cedkpheller: for now it is stuck22:48
phellercedk: ah ha22:48
cedkpheller: not engough resources. So I think it is not a major priority22:48
phellercedk: agreed, I think it's better to finish many of the things that are in the bug tracker first, and the existing roadmap things22:49
cedkpheller: almost all customer I saw with Tryton or OE was going for GTK client22:49
cedkpheller: soa was more a POC to show the direction if someone want to continue it or found it22:50
cedkyes by the way I should create the roadmap for next release22:50
-!- bechamel(~user@host-85-201-147-56.brutele.be) has joined #tryton22:53
gordon_geekonot having a web client is a major issue for where i work22:55
phellergordon_geeko: as in a "full" replacement for the gtk client?22:56
phellergordon_geeko: or just something purpose built for a few things...22:56
gordon_geekopheller: basically yes, having apps in the web browser is the goal22:58
gordon_geekopheller: to unify things in a way22:59
cedkgordon_geeko: you get people not working from their workstation?22:59
gordon_geekocedk: sure, they'll have a pc - but the idea is to have everything accessible from one browser23:01
phellercedk: it is generally true also at my company that we don't use applications with thick clients any more.  just about everything we use, except office suite and mail, is a web application23:01
cedkbut I hope guys, you see that it is not logical23:01
cedkHTTP+HTML+Javascript is the worst stack for developing software :-)23:02
gordon_geekocedk: it's also about integrating functionality - or if it's not true integration, at least creating the illusion23:02
phellercedk: I don't mind using the thick client, but I'm not the one who always decides which applications are used.  And I'm sad to say that the people who make the decisions often have silly requirements.23:03
gordon_geekocedk: agree on that one23:03
phellercedk, gordon_geeko: definitely agreed there.23:03
cedkgordon_geeko: for me, integration is not about having everything in one software but having softwares speaking to each others like we do with CalDAV, WebDAV and later IMAP23:03
cedkI know that for now Web2.0 is the *buzz* word23:04
cedkwebbrowser is the new VT100 :-)23:05
phellercedk: hah!23:05
gordon_geekoLOL23:05
cedkgordon_geeko: but I know that for merketing it will be better to have a webclient23:07
cedkand we got POC that proves it is doable23:07
gordon_geekocedk: yes, it weights heavy23:07
gordon_geekocedk: the choice for us is between tryton and developing from scratch - the latter using a web application framework23:08
cedkgordon_geeko: you can develop a web application with Tryton23:09
gordon_geekocedk: what's POC?23:10
-!- johbo(~joh@statdsl-085-016-072-173.ewe-ip-backbone.de) has joined #tryton23:10
phellerproof of concept23:10
cedkPOC = Proof Of Concept23:10
gordon_geekoah23:10
cedkby the way, sharoon from openlabs also think about webclient23:11
gordon_geekoi'm leaning towards tryton and sponsoring a web client23:11
gordon_geekoit can't be that hard, you've already got the proper infrastructure for it23:11
cedkgordon_geeko: yes, soa can already talk to the server (need some update for working with 1.8)23:12
phellergordon_geeko: ... especially with proteus finally coming up to speed23:12
cedkgordon_geeko: and tree view is almost working23:12
cedkgordon_geeko: next big step will be the form view23:13
phellertime to go home.  too much work for one day.  good night!23:16
cedkpheller: bye23:17
-!- tony__(~tony@116.233.246.78) has joined #tryton23:45
-!- tony__(~tony@116.233.246.78) has joined #tryton23:50
-!- tony__(~tony@116.233.246.78) has joined #tryton23:54

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