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

chat.freenode.net #tryton log beginning Mon Sep 19 00:00:02 CEST 2011
2011-09-19 01:50 <zodman> dudes it this a error ?
2011-09-19 01:50 <zodman> http://pastebin.com/RjL45yVV
2011-09-19 02:06 -!- yangoon_rm(~mathiasb@p549F36FD.dip.t-dialin.net) has left #tryton
2011-09-19 08:31 -!- ndn_pit(~ndn_pit@95.56.114.241) has left #tryton
2011-09-19 09:25 -!- ndn_pit(~ndn_pit@95.56.114.241) has left #tryton
2011-09-19 10:13 <reichlich> Hi, im trying to reply on codereview but I get 500 error all the time. Is there something wrong?
2011-09-19 12:20 <abeamud> Hi, where I can find more info about copy, write, delete, etc.. methods?
2011-09-19 12:21 <cedk> abeamud: doc.tryton.org
2011-09-19 12:22 <abeamud> sorry, was in the api reference...
2011-09-19 12:22 <abeamud> thanks
2011-09-19 12:52 <abeamud> In the Company definition, the default_main_company is:
2011-09-19 12:52 <abeamud> return Transaction().context.get('company') or False
2011-09-19 12:52 <abeamud> is it the same using return self.browse(self.id) or False?
2011-09-19 13:05 <ndn_pit> when are you planning a new release of Tryton?
2011-09-19 13:05 <cedk> abeamud: no you can not pass BrowseRecord through the network
2011-09-19 13:10 <abeamud> cedk: I need to convert to a dict, no?
2011-09-19 13:12 <nicoe> abeamud: why would you return a dict ?
2011-09-19 13:13 <abeamud> nicoe: with the default main company info
2011-09-19 13:14 <nicoe> abeamud: company is a m2o field so you need to return an id
2011-09-19 13:14 <nicoe> I don't understand why you would need a dict
2011-09-19 13:15 <abeamud> ah, ok
2011-09-19 13:16 <abeamud> nicoe: I'm trying to understand if I can use browse in place of Transaction.context.get
2011-09-19 13:18 <cedk> abeamud: you can not
2011-09-19 13:18 <nicoe> browse is a different beast than the context
2011-09-19 13:18 <abeamud> where can I find more info about that?
2011-09-19 13:21 <nicoe> The context is not really explained in the docs
2011-09-19 13:21 <nicoe> The context is a dict that is linked to a transaction
2011-09-19 13:22 <abeamud> nicoe: I don't understand why to return the default value of the company I need a transaction...
2011-09-19 13:23 <nicoe> Because in the context that is sent by the client there is the information about the company used by the user
2011-09-19 13:23 <nicoe> And this information looks like a sensible default
2011-09-19 13:27 <abeamud> The 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?
2011-09-19 13:28 <nicoe> I don't understand
2011-09-19 13:29 <abeamud> the default_main_company method is called from the client via xmlrpc, json, etc.. no?
2011-09-19 13:35 -!- ndn_pit(~ndn_pit@95.56.192.80) has left #tryton
2011-09-19 14:34 <abeamud_> I'm back... any rule to apply when to use Transaction.context.get and self.browse?
2011-09-19 14:34 <cedk> abeamud_: try to avoid the usage of context
2011-09-19 14:40 <abeamud_> cedk: Then I avoid querying records using Transaction, no? only for create, delete, etc.. no?
2011-09-19 14:41 <cedk> abeamud_: don't understand
2011-09-19 14:41 <cedk> abeamud_: what do you want to do?
2011-09-19 14:44 <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...
2011-09-19 14:48 <cedk> abeamud_: default method must always return the value format of the field as you get it from a read
2011-09-19 14:48 <cedk> abeamud_: because those default_* methods can be called through the network
2011-09-19 14:53 <abeamud_> cedk: ok, Is it possible to implement the default_main_company without using Transaction.context.get?
2011-09-19 14:55 <cedk> abeamud_: don't know it depends on which behavior you want
2011-09-19 14:58 <abeamud_> cedk: In the User class
2011-09-19 15:00 <cedk> abeamud_: ok what do you want? It is like if you ask me if you can write a method without using float
2011-09-19 15:02 <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?
2011-09-19 15:11 <cedk> abeamud_: not here because we want to set the company context as default value
2011-09-19 15:12 <abeamud_> cedk: ok
2011-09-19 16:05 -!- udono(~udono@ip-95-222-129-145.unitymediagroup.de) has left #tryton

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