IRC logs of #tryton for Sunday, 2012-03-11

chat.freenode.net #tryton log beginning Sun Mar 11 00:00:02 CET 2012
2012-03-11 00:49 <smarro> cedk: ping
2012-03-11 07:55 <vimal00003333> hi guys.. new tryton user here trying to install it on vm, centos 6.2.. installation completed (trytond and tryton rpms from EPEL), and i am able to start trytond successfully.. however tryton is unable to connect to port 8000, but i see that trytond is listening to that port on localhost and am out of ideas..
2012-03-11 09:04 <vimal00003333> when connecting, i am receiving "code 400, message Bad request syntax"
2012-03-11 09:05 <vimal00003333> http://pastebin.com/HzbRJ5kp <----- someone plz check and assist me, i seem to be missing something really simple here
2012-03-11 14:53 <smarro> Hi, in roundup (in a message), how can i put the review with link to codereview page?
2012-03-11 15:08 -!- anthony(~chatzilla@s537751a5.adsl.wanadoo.nl) has left #tryton
2012-03-11 15:31 <cedk> smarro: just: review 1234
2012-03-11 15:32 <smarro> cedk: ok... thanks!!
2012-03-11 16:22 <cedk> albertca: hi
2012-03-11 16:22 <cedk> albertca: you talked about a patch for convert.py
2012-03-11 16:22 <albertca> cedk: hi. two consecutive days on IRC :)
2012-03-11 16:22 <albertca> cedk: yes, but I'm not sure I did the correct things
2012-03-11 16:22 <cedk> albertca: I think I'm facing the same issue with the removal of workflow
2012-03-11 16:22 <albertca> cedk: simply tried to avoid the crashes...
2012-03-11 16:23 <cedk> albertca: could you create a codereview
2012-03-11 16:23 <albertca> cedk: let me check
2012-03-11 16:26 <albertca> cedk: here it is: http://codereview.tryton.org/283003
2012-03-11 16:29 <cedk> albertca: looks like my issue
2012-03-11 16:30 <albertca> cedk: be sure to check it because I haven't got a clue with what those changes meant :)
2012-03-11 22:37 <katr> Hi!
2012-03-11 22:37 <katr> I have a question regarding inheritance with "_inherits".
2012-03-11 22:37 <katr> Do I have access to all the methods of the base class as well?
2012-03-11 22:39 <cedk> katr: there is a getattr for that but it is not recommended for every methods
2012-03-11 22:40 <cedk> katr: it is there for the default methods
2012-03-11 22:40 <katr> cedk: First off all, thanks for your help.
2012-03-11 22:42 <katr> I have to say, I'm migrating some of my modules from OpenERP to Tryton.
2012-03-11 22:42 <katr> That kind of inheritance are one of the things that work in OE :).
2012-03-11 22:43 <katr> I have a base class where I have put all my common methods in order not to duplicate them in the derived classes.
2012-03-11 22:44 <katr> What options do I have in Tryton?
2012-03-11 22:44 <bechamel> katr: what do you want to do exactly?
2012-03-11 22:45 <cedk> katr: it sounds strange
2012-03-11 22:47 <cedk> for me, it doesn't work anymore in OE: https://bazaar.launchpad.net/~openerp/openobject-server/trunk/view/head:/openerp/osv/orm.py#L3265
2012-03-11 22:48 <katr> I don't want to bother you with details, but I have to common class "VehicleBillingEntry" and derive to class "VehicleBillingEntryPump" and "VehicleBillingEntryTransport" from it.
2012-03-11 22:48 <cedk> the main issue with such behavior is that most of the method take list of ids as parameter but there are different for the parent Model
2012-03-11 22:49 <cedk> katr: why do you use _inherits and not a Python heritage?
2012-03-11 22:49 <katr> cedk: OE: I'm on 6.x trunk and I works for me.
2012-03-11 22:50 <katr> cedk: I must admit I did not expect that to work. :) Ok, I have to try that.
2012-03-11 22:51 <cedk> katr: do you need to have a common table for the 2 objects?
2012-03-11 22:51 <katr> cedk: Yes they share a lot of columns.
2012-03-11 22:52 <cedk> katr: that doesn't answer the question
2012-03-11 22:52 <cedk> katr: why should they need to be stored in the same table?
2012-03-11 22:54 <katr> In OE I have done some reporting on the common table, but I haven't thought I've the common table is really necessary.
2012-03-11 22:54 <cedk> katr: and what are the shared methods?
2012-03-11 22:56 <cedk> katr: because it will work if you don't use ids
2012-03-11 22:56 <katr> Some constrains and some methods which are called on button clicks. And there are some common columns as well.
2012-03-11 22:58 <katr> cedk: But all the RPC methods (i.e. the ones which get called on buttons clicks?) implicitly get the IDs passed?
2012-03-11 22:58 <cedk> katr: yes
2012-03-11 23:02 <katr> That's hard. The only possible solution that I can think off, is to just extend the base class with _name and add an column "type" that distinguishes between the two different types of entries.
2012-03-11 23:05 <cedk> katr: it is difficult to answer without knowing the use cases
2012-03-11 23:06 <katr> Other topic: As already said I'm migrating from OE, I have to say, that I REALLY like Tryton because of it's superior code quality and modularity.
2012-03-11 23:07 <katr> I just can't ready one more line more than 300 characters long. :) The code base horrible.
2012-03-11 23:08 <bechamel> katr: :)
2012-03-11 23:09 <cedk> katr: about the getattr with inherits, the current behavior is done by choice because we think explicit definition is better than implicit
2012-03-11 23:10 <cedk> katr: so you have to explicitly define with parent method must be called because inherits can work with many parents
2012-03-11 23:10 <katr> cedk: Ok.
2012-03-11 23:11 <cedk> katr: but with the name of your classes, it really sounds like a type distinction than 2 different objects
2012-03-11 23:11 <katr> cedk: That's true. Haven't thought about that.
2012-03-11 23:12 <cedk> katr: also you can keep your current design but you must just explicitly call the parent method in each children objects
2012-03-11 23:12 <katr> cedk: I think your right. I can't remember why I did it that way a long time ago.
2012-03-11 23:14 <katr> Other question: Why don't we have something cool like the Q-objects Django has?
2012-03-11 23:15 <cedk> katr: what is Q-objects?
2012-03-11 23:15 <katr> https://docs.djangoproject.com/en/1.3/topics/db/queries/#complex-lookups-with-q-objects
2012-03-11 23:16 <cedk> katr: we are working on https://code.google.com/p/python-sql/
2012-03-11 23:17 <cedk> katr: when it will be ready, we will use it for trytond
2012-03-11 23:18 <katr> Ok, that look very similar. Can't wait to use that.
2012-03-11 23:19 <cedk> katr: hope we will have a student to work on it https://code.google.com/p/tryton/wiki/gsoc2012ideas#Python-SQL
2012-03-11 23:22 <katr> cedk: Ok, last question: Is there any work underway toward the active record pattern? I think I have once read something about it in the IRC logs or in Google groups.
2012-03-11 23:23 <cedk> katr: it was put on hold for some time
2012-03-11 23:25 <katr> cedk: That's bad.
2012-03-11 23:25 <cedk> katr: patch is welcome :-)
2012-03-11 23:26 <katr> cedk: I think that exceeds my skill level a little bit. :)
2012-03-11 23:27 <katr> cedk: One more thing: I have created an Austrian account chart. Any interest in getting that upstream?
2012-03-11 23:28 <cedk> katr: yes of course
2012-03-11 23:29 <katr> Ok fine. I will push it somewhere to github or somewhere more hg-ish.
2012-03-11 23:30 <cedk> katr: we preceed by coderview see HowtoContribute on the wiki
2012-03-11 23:40 <albertca> cedk: is there an easy way of knowing which backend is being used for a given cursor?
2012-03-11 23:41 <cedk> albertca: in CONFIG
2012-03-11 23:42 <albertca> cedk: Didn't think of that one! Thanks!
2012-03-11 23:45 <katr> cedk: OK, I'll go through the procedure described. Thanks for your help.

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