IRC logs of #tryton for Monday, 2013-03-11 #tryton log beginning Mon Mar 11 00:00:03 CET 2013
prusglajotemisI 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 ?11:26
cedkprusglajotemis: don't understand the question, but class inheritance is Python class inheritance11:48
prusglajotemiscedk: 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.12:15
prusglajotemisand when a Person's method 'goWork' is called from anywhere, I want it to use Student's method goWork.12:15
prusglajotemisis it possible with tryton framework?12:16
rmuprusglajotemis: this is possible. grep the modules for "super" to see examples.12:30
cedkprusglajotemis: no12:31
prusglajotemiscedk: 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 modules12:41
cedkprusglajotemis: extend the Model12:42
prusglajotemiscedk: 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 ?13:00
cedkprusglajotemis: you can not13:04
cedkprusglajotemis: it is invalid in Object Oriented Programmation13:05
prusglajotemiscedk: thanks13:08
prusglajotemiscedk: in some cases this may be done using for example Dependency Injection pattern, or other ways, but i don't know Python well13:17
rmuprusglajotemis: when you are extending a model you can override methods and change behaviour.13:23
vcardonHello everyone, first time posting on this channel, please be forgiving of my ignorance13:49
vcardonI had just one quick question, and perhaps has it been asked before13:50
vcardonI 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 methods13:53
cedkvcardon: person == party13:58
cedkvcardon: there was plan to make a module party_relationship to allow to create relation between parties13:58
vcardonsame as base_partner_relation in OERP (to invoice third parties for exemple), or more of a method to link multiple contacts to multiple parties ?14:00
cedkvcardon: don't know what you name contacts?14:01
cedkprusglajotemis: not sure Dependency Injection is really needed in dymamic language like Python14:02
cedkprusglajotemis: but in some way, the Tryton extention of Model looks like Dep. Inj.14:03
vcardonyeah, 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.14:04
vcardonThanks Cedric for your effort with answering my question14:05
cedkvcardon: what is "<=>" ?14:05
cedkvcardon: with relation, I mean any kind of relation like: "is employee of", "is child of", "are siblings", "are concurrent" etc.14:07
vcardonok, I see what you're saying14:10
-!- vcardon( has left #tryton20:07
plantianhi guys, what is the best technique/strategy to use when profiling a workflow in the client?20:35
coepsHi 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?20:37
plantiancoeps: Does the official demo, (, not have the production module installed?20:40
coepsas far as I can see not.20:48
plantiancoeps: You're right it is not installed, you can see it, uninstalled, in the list of modules if you login as admin.20:55
plantiancoeps: 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.20:58
flo0Can I make a text field only two rows high?22:41

Generated by 2.11.0 by Marius Gedminas - find it at!