IRC logs of #tryton for Thursday, 2013-09-05

chat.freenode.net #tryton log beginning Thu Sep 5 00:00:02 CEST 2013
2013-09-05 06:21 <ACBobby> i'm having a slight issue and i was wondering if anyone in here might be able to help with it :)
2013-09-05 12:08 -!- priyankarani(~priyanka@122.177.85.209) has left #tryton
2013-09-05 13:17 <jvblasco> may User = Pool().get('res.user')(Transaction.user) assign the user object to User?
2013-09-05 13:17 <cedk> jvblasco: don't understand
2013-09-05 13:19 <jvblasco> i need to retrieve the user object of the user that is making a request
2013-09-05 13:19 <cedk> jvblasco: so yes, User will be
2013-09-05 13:19 <cedk> jvblasco: convention is to use lower case for instance
2013-09-05 13:20 <cedk> jvblasco: oops, it is Transaction().user
2013-09-05 13:21 <jvblasco> cedk: ok, thnx so much.
2013-09-05 13:22 <jvblasco> cedk: so i guess Pool().get('model.name')(id) retrieves the instance of the model.name with the id, isn't it?
2013-09-05 13:25 <cedk> jvblasco: yes
2013-09-05 13:46 <jvblasco> and may id be an ids list to retrieve a list of instances?
2013-09-05 13:47 <cedk> jvblasco: no, you must use browse method
2013-09-05 15:11 -!- vernicho1(~Thunderbi@gex01-1-78-234-55-95.fbx.proxad.net) has left #tryton
2013-09-05 15:37 <WUD> Hi, If I have two models A & B, can I have a fields.function(functions.O2M(b)) in A and fields.function(functions.M2O(a)) in B?
2013-09-05 16:14 <abhisar> i want to make a model that would be in one2one relation with sale.line .How can i do it??any modules where can i have reference for one2one field implementation
2013-09-05 16:15 <cedk> abhisar: not in base module because one2one relation should be used in very rare cases
2013-09-05 16:20 <abhisar> then while creating one2one fields what should be the values of origin and target
2013-09-05 16:21 <cedk> abhisar: one2one is like many2many
2013-09-05 17:08 <jvblasco> cedk: ok thnx so much ;)
2013-09-05 17:10 -!- WUD(~WUD@122.177.85.209) has left #tryton
2013-09-05 20:18 <jvblasco> does anyone know how can i search a party.party by email?
2013-09-05 20:21 <jvblasco> i tried with customer = cls.search([('email', '=', customer_email)]) but the server says that email field has no search function for it. I noticed that everything is related to party.contact_mechanism but in that model, email, is also a functional field so i guess that i won't be able to search it there too
2013-09-05 20:27 <cedk> jvblasco: you can do: [('contact_mechanisms.value', '=', <email>), ('contact_mechanisms.type', '=', 'email')]
2013-09-05 20:27 <jvblasco> cedk: but i do it with Function.search or the model search method?
2013-09-05 20:29 <cedk> jvblasco: Party.search(…)
2013-09-05 20:31 <jvblasco> cedk: thnx so much, i really appreciate the help cedk
2013-09-05 20:33 <jvblasco> cedk: and how may i write that kind of field now?
2013-09-05 20:34 <jvblasco> cedk: i see the function field has a setter method, but being a relation i don't really get how to do it?
2013-09-05 21:08 <cedk> jvblasco: I don't understand
2013-09-05 21:16 <jvblasco> cedk: i need to go home cause office is closing gimme a moment to arrive home and connect, or i'll try tomorrow. Anyway i think i have it solver. The problem is that fucntional fields behaviour is not the same as the other fields and i'm still trying to learn how they really work
2013-09-05 21:16 <jvblasco> cedk: anyway thnx so much for the help i need to finish the MVP asap and im getting a lot of help here ;)
2013-09-05 21:17 <jvblasco> later everyone

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