IRC logs of #tryton for Monday, 2013-03-11

chat.freenode.net #tryton log beginning Mon Mar 11 00:00:03 CET 2013
2013-03-11 11:26 <prusglajotemis> I have a question about model inheritance in Tryton. How can i override model method in subclass? When a superclass is called from other modules, I need it to use a method that i have writen in a subclass. Is it possible in Tryton ?
2013-03-11 11:48 <cedk> prusglajotemis: don't understand the question, but class inheritance is Python class inheritance
2013-03-11 12:15 <prusglajotemis> cedk: for exmaple I have a model "Person" with method goWork. And this model is being used in many modules, and I want to create a new module with a model Student that should be a subclass of Person.
2013-03-11 12:15 <prusglajotemis> and when a Person's method 'goWork' is called from anywhere, I want it to use Student's method goWork.
2013-03-11 12:16 <prusglajotemis> is it possible with tryton framework?
2013-03-11 12:30 <rmu> prusglajotemis: this is possible. grep the modules for "super" to see examples.
2013-03-11 12:31 <cedk> prusglajotemis: no
2013-03-11 12:41 <prusglajotemis> cedk: ok then what is the best way in tryton to change method's behaviour without changing the initial code? the method is already used in many modules
2013-03-11 12:42 <cedk> prusglajotemis: extend the Model
2013-03-11 13:00 <prusglajotemis> cedk: extending a Model doesn't change its behaviour. How do i make subclass method work instead of superclass's method, even if superclass's method is called ?
2013-03-11 13:04 <cedk> prusglajotemis: you can not
2013-03-11 13:05 <cedk> prusglajotemis: it is invalid in Object Oriented Programmation
2013-03-11 13:08 <prusglajotemis> cedk: thanks
2013-03-11 13:17 <prusglajotemis> cedk: in some cases this may be done using for example Dependency Injection pattern, or other ways, but i don't know Python well
2013-03-11 13:23 <rmu> prusglajotemis: when you are extending a model you can override methods and change behaviour.
2013-03-11 13:49 <vcardon> Hello everyone, first time posting on this channel, please be forgiving of my ignorance
2013-03-11 13:50 <vcardon> I had just one quick question, and perhaps has it been asked before
2013-03-11 13:53 <vcardon> I was wondering whether tryton would go the "base_contact" as some extensions exist in OERP (party <=> adresse <=> person) or stay with "base" (party <=> person) for the contact management methods
2013-03-11 13:58 <cedk> vcardon: person == party
2013-03-11 13:58 <cedk> vcardon: there was plan to make a module party_relationship to allow to create relation between parties
2013-03-11 14:00 <vcardon> same as base_partner_relation in OERP (to invoice third parties for exemple), or more of a method to link multiple contacts to multiple parties ?
2013-03-11 14:01 <cedk> vcardon: don't know what you name contacts?
2013-03-11 14:02 <cedk> prusglajotemis: not sure Dependency Injection is really needed in dymamic language like Python
2013-03-11 14:03 <cedk> prusglajotemis: but in some way, the Tryton extention of Model looks like Dep. Inj.
2013-03-11 14:04 <vcardon> yeah, in my mind a contact would be more of a person, but the party <=> contact model wouldn't really be able to allow that cleanly (a person and an adresse are the same). So I imagine you're describing more a base_partner_relation module.
2013-03-11 14:05 <vcardon> Thanks Cedric for your effort with answering my question
2013-03-11 14:05 <cedk> vcardon: what is "<=>" ?
2013-03-11 14:07 <cedk> vcardon: with relation, I mean any kind of relation like: "is employee of", "is child of", "are siblings", "are concurrent" etc.
2013-03-11 14:10 <vcardon> ok, I see what you're saying
2013-03-11 20:07 -!- vcardon(~vcardon@LNeuilly-152-23-15-185.w193-252.abo.wanadoo.fr) has left #tryton
2013-03-11 20:35 <plantian> hi guys, what is the best technique/strategy to use when profiling a workflow in the client?
2013-03-11 20:37 <coeps> Hi folks, is there somewhere a demo environment (or a demodownload DB available) where all standard-modules are prefilled with data? I am trying to understand Workflow using the production module. Or maybe different: can someone point me to an easy example in the standard-modules, if available?
2013-03-11 20:40 <plantian> coeps: Does the official demo, (demo.tryton.org:8000), not have the production module installed?
2013-03-11 20:48 <coeps> as far as I can see not.
2013-03-11 20:55 <plantian> coeps: You're right it is not installed, you can see it, uninstalled, in the list of modules if you login as admin.
2013-03-11 20:58 <plantian> coeps: In the past I have had to just setup a development environment with the correct modules and then setup the base environment by logging in as admin, then dump that sql file and use it to re-load after I've experimented with new modules, options and configurations.
2013-03-11 22:41 <flo0> Can I make a text field only two rows high?

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