IRC logs of #tryton for Monday, 2011-09-19

chat.freenode.net #tryton log beginning Mon Sep 19 00:00:02 CEST 2011
zodmandudes it this a error ?01:50
zodmanhttp://pastebin.com/RjL45yVV01:50
-!- yangoon_rm(~mathiasb@p549F36FD.dip.t-dialin.net) has left #tryton02:06
-!- ndn_pit(~ndn_pit@95.56.114.241) has left #tryton08:31
-!- ndn_pit(~ndn_pit@95.56.114.241) has left #tryton09:25
reichlichHi, im trying to reply on codereview but I get 500 error all the time. Is there something wrong?10:13
abeamudHi, where I can find more info about copy, write, delete, etc.. methods?12:20
cedkabeamud: doc.tryton.org12:21
abeamudsorry, was in the api reference...12:22
abeamudthanks12:22
abeamudIn the Company definition, the default_main_company is:12:52
abeamudreturn Transaction().context.get('company') or False12:52
abeamudis it the same using return self.browse(self.id) or False?12:52
ndn_pitwhen are you planning a new release of Tryton?13:05
cedkabeamud: no you can not pass BrowseRecord through the network13:05
abeamudcedk: I need to convert to a dict, no?13:10
nicoeabeamud: why would you return a dict ?13:12
abeamudnicoe: with the default main company info13:13
nicoeabeamud: company is a m2o field so you need to return an id13:14
nicoeI don't understand why you would need a dict13:14
abeamudah, ok13:15
abeamudnicoe: I'm trying to understand if I can use browse in place of Transaction.context.get13:16
cedkabeamud: you can not13:18
nicoebrowse is a different beast than the context13:18
abeamudwhere can I find more info about that?13:18
nicoeThe context is not really explained in the docs13:21
nicoeThe context is a dict that is linked to a transaction13:21
abeamudnicoe: I don't understand why to return the default value of the company I need a transaction...13:22
nicoeBecause in the context that is sent by the client there is the information about the company used by the user13:23
nicoeAnd this information looks like a sensible default13:23
abeamudThe id returned byt the default_main_company method is used in other method to return for example the name in a field in the client, no?13:27
nicoeI don't understand13:28
abeamudthe default_main_company method is called from the client via xmlrpc, json, etc.. no?13:29
-!- ndn_pit(~ndn_pit@95.56.192.80) has left #tryton13:35
abeamud_I'm back... any rule to apply when to use Transaction.context.get and self.browse?14:34
cedkabeamud_: try to avoid the usage of context14:34
abeamud_cedk: Then I avoid querying records using Transaction, no? only for create, delete, etc.. no?14:40
cedkabeamud_: don't understand14:41
cedkabeamud_: what do you want to do?14:41
abeamud_cedk: only understand the default_main_company method in the User class... If I need to implement something like that, I want to know the best way to do it...14:44
cedkabeamud_: default method must always return the value format of the field as you get it from a read14:48
cedkabeamud_: because those default_* methods can be called through the network14:48
abeamud_cedk: ok, Is it possible to implement the default_main_company without using Transaction.context.get?14:53
cedkabeamud_: don't know it depends on which behavior you want14:55
abeamud_cedk: In the User class14:58
cedkabeamud_: ok what do you want? It is like if you ask me if you can write a method without using float15:00
abeamud_cedk: you said me "try to avoid the usage of context", the User default_main_company method  is "return Transaction().context.get('company') or False".... Can I avoid the usage of Transaction().conext?15:02
cedkabeamud_: not here because we want to set the company context as default value15:11
abeamud_cedk: ok15:12
-!- udono(~udono@ip-95-222-129-145.unitymediagroup.de) has left #tryton16:05

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