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