IRC logs of #tryton for Thursday, 2014-06-12

chat.freenode.net #tryton log beginning Thu Jun 12 00:00:01 CEST 2014
2014-06-12 01:07 -!- frispete(~frispete@p54A90A55.dip0.t-ipconnect.de) has joined #tryton
2014-06-12 01:35 -!- digitalsatori(~Thunderbi@116.234.181.110) has joined #tryton
2014-06-12 03:29 -!- digitalsatori(~Thunderbi@114.94.158.143) has joined #tryton
2014-06-12 04:08 -!- digitalsatori(~Thunderbi@114.94.158.143) has joined #tryton
2014-06-12 05:34 -!- digitalsatori(~Thunderbi@114.94.158.143) has joined #tryton
2014-06-12 06:40 -!- frispete_(~frispete@p54A90E0A.dip0.t-ipconnect.de) has joined #tryton
2014-06-12 07:04 -!- LordVan(~LordVan@gentoo/developer/LordVan) has joined #tryton
2014-06-12 07:17 -!- yangoon(~mathiasb@p549F08E0.dip0.t-ipconnect.de) has joined #tryton
2014-06-12 07:28 -!- grasbauer(~jan@dslb-188-106-131-082.pools.arcor-ip.net) has joined #tryton
2014-06-12 07:52 -!- bechamel(~Adium@62-197-96-189.teledisnet.be) has joined #tryton
2014-06-12 07:57 -!- rpit(~ralf@dslb-088-071-255-168.pools.arcor-ip.net) has joined #tryton
2014-06-12 08:47 -!- mar(~marius@v100.nfq.lt) has joined #tryton
2014-06-12 08:47 <mar> is it possible to add filter by origin?
2014-06-12 08:48 <mar> I have Many2One select, I want filter in the popup
2014-06-12 08:48 <mar> or maybe it's possible to create custom filters?
2014-06-12 08:54 <grasbauer> mar: add a domain http://doc.tryton.org/3.2/trytond/doc/topics/domain.html#topics-domain
2014-06-12 08:55 <mar> is it going to "optimize" query?
2014-06-12 08:56 <grasbauer> mar: how optimize?
2014-06-12 08:57 <mar> i mean it will not make million queries when referencing origin in list?
2014-06-12 09:00 -!- jeancavallo(~giovanni@LPuteaux-656-01-230-52.w80-12.abo.wanadoo.fr) has joined #tryton
2014-06-12 09:01 <grasbauer> mar: domain on the field fiters the possible values for the field - like domain=[('product','=', 'salable')] - so you you see only the products that are salable in the list ... don't know what you mean with millions of query - its a WHERE-Clause applied to read ...
2014-06-12 09:20 <mar> what I want to do is filter moves by purchase id
2014-06-12 09:20 <mar> origin.purchase.id = x (purchase.line)
2014-06-12 09:21 <mar> so the question is will I be able to do that, and if I will, will it generate one query for filtering, or make a query for each row
2014-06-12 09:22 <grasbauer> mar: don't understand right now: which moves? stock.moves?
2014-06-12 09:22 <mar> yeah
2014-06-12 09:24 <grasbauer> mar: purchase is already linked to stock.moves
2014-06-12 09:24 <grasbauer> mar: purchase.moves
2014-06-12 09:26 <mar> but I'm doing it from stock.move POV
2014-06-12 09:27 <grasbauer> mar: also stock.move has a function field to get the related purchase
2014-06-12 09:28 <mar> ok thanks
2014-06-12 09:28 -!- vcardon(~vcardon@LNeuilly-152-23-15-185.w193-252.abo.wanadoo.fr) has joined #tryton
2014-06-12 09:30 <grasbauer> mar: take a look to modules/purchase/stock.py - there are function fields that will get all relevant informations about the purchase
2014-06-12 09:37 -!- nicoe(~nicoe@87.215.31.146) has joined #tryton
2014-06-12 09:40 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2014-06-12 09:54 <pokoli> cedk: didn't understand how i broke the test by my change, but i will have a look today
2014-06-12 09:54 <cedk> pokoli: it reveals the broken tests
2014-06-12 09:55 <pokoli> cedk: so that was the objective :)
2014-06-12 09:56 -!- bechamel(~Adium@62-197-96-189.teledisnet.be) has joined #tryton
2014-06-12 10:00 <cedk> bechamel: did you remember why we choose the convert in the search bar: 1..2 -> >= 1, < 2
2014-06-12 10:01 <bechamel> cedk: no, as usual I forget those kind of stuffs
2014-06-12 10:03 <bechamel> or maybe it is to reflect the python range() behaviour
2014-06-12 11:27 <pokoli> cedk: the issue is that the test needs a rollback on transaction
2014-06-12 11:28 <pokoli> cedk: this should not be done automatically by trytond, don't it?
2014-06-12 11:29 <cedk> pokoli: no the problem is once a query fails all the transaction is corrupted and should be closed
2014-06-12 11:30 <cedk> pokoli: indeed the test should be rewritten to make one exception test per transaction
2014-06-12 11:30 <cedk> I though we could maybe use save points between each query but I think it will have performance issue
2014-06-12 11:31 <cedk> but it will be a good thing to test as sometimes we have to do a lot of contorsion because of that
2014-06-12 11:33 <pokoli> oks, so I will rewrite the test
2014-06-12 11:34 <pokoli> cedk: for me save points performance is not relevant to tests :)
2014-06-12 11:35 <pokoli> cedk: I don't get any use case where I wan't a save point in a tryton transaction, will comment if i encounter one
2014-06-12 11:39 <pokoli> cedk: http://codereview.tryton.org/13331002/
2014-06-12 11:47 <cedk> pokoli: the test doesn't need previous data?
2014-06-12 11:47 <cedk> pokoli: I don't think I understand your point on save points
2014-06-12 11:54 <pokoli> cedk: no, the test doesn't need previous data as it only creates new triggers
2014-06-12 11:54 <pokoli> cedk: only references to models, but they exist before
2014-06-12 11:55 <pokoli> cedk: what i said about savepoints is i can't image an use case where a save_point is needed inside a tryton transaction
2014-06-12 11:59 <cedk> pokoli: I do something and the query fails, I now want to show a proper error message so I need to query the translation table
2014-06-12 12:05 <pokoli> cedk: AFAIU currently this is managed with a new cursor, so the point if it's better to use a save_point or a new cursor
2014-06-12 12:08 <cedk> pokoli: yes
2014-06-12 12:09 <cedk> pokoli: but if we have save point, perhaps new feature could be done
2014-06-12 12:53 -!- littlebit(~Thunderbi@ulmg-5d84d580.pool.mediaWays.net) has joined #tryton
2014-06-12 13:04 -!- kstenger(~karla@200.124.209.158) has joined #tryton
2014-06-12 13:12 -!- ronaldm(~ronaldm@197.211.216.214) has joined #tryton
2014-06-12 13:12 <mar> is it possible to create wizard, that helps fill up One2Many relations in edit window? I mean I click a button, select something, and 5 entries appear in One2Many relation edit field.
2014-06-12 13:21 <pokoli> mar: sure, just call the wizard from the button, and write to active_ids
2014-06-12 13:21 <mar> is there any example somewhere so I could look up the code?
2014-06-12 13:22 <mar> i mean some default module
2014-06-12 13:22 <pokoli> mar: i don't get any in mind by now
2014-06-12 13:31 <pokoli> mar: if you just post your existing code on pastebin I can help you :)
2014-06-12 13:37 <mar> i figured out I formulated my question wrong
2014-06-12 13:39 <mar> lets try again. not an actual example but:
2014-06-12 13:40 <mar> I'm editing Invoice (One2Many is invoice lines). I want to create a button below One2Many field, for example Select Purchase, and after selecting Purchase, invoice lines from the Purchase appears
2014-06-12 13:42 <mar> important thing is that invoice lines doesn't exist in database yet
2014-06-12 13:42 <mar> I want to create them dynamically
2014-06-12 13:42 <mar> can I do that?
2014-06-12 13:49 <cedk> mar: use purchase_invoice_line_standalone module
2014-06-12 13:49 <mar> cedk, it's not real use case, but I want to do something like this in my custom module
2014-06-12 13:58 <pokoli> mar: you need to link invoice_lines with purchase_lines? or what you're trying to achive?
2014-06-12 14:00 <mar> I want to create lines into One2Many edit field depending on other object that I select
2014-06-12 14:05 <mar> "autocomplete" One2Many field depending on selected object from wizard ;)
2014-06-12 14:09 <cedk> mar: for me it is not possible currently to do it properly
2014-06-12 15:03 <pokoli> mar: I'm pretty sure that another way of doing it will exist :)
2014-06-12 15:04 <mar> can u suggest one ?
2014-06-12 15:05 <pokoli> mar: no because I still don't understand what you are trying to achieve
2014-06-12 15:10 <jeancavallo> mar: It looks like you may want to use a M2O field (which might be a function field) on which you would set an on_change method to populate the O2M list
2014-06-12 15:16 <cedk> that's probably a bad design because you put a static field for dynamic behavior
2014-06-12 15:19 -!- smarro(~sebastian@17-21-138-208-br1-STATIC-dsl.cwjamaica.com) has joined #tryton
2014-06-12 17:28 -!- alisonken1lap3(~alisonken@18.18.ultimate-int.uia.net) has joined #tryton
2014-06-12 18:09 -!- Telesight(~anthony@77-175-159-159.FTTH.ispfabriek.nl) has joined #tryton
2014-06-12 19:08 -!- vcardon(~vcardon@LNeuilly-152-23-15-185.w193-252.abo.wanadoo.fr) has left #tryton
2014-06-12 19:42 -!- smarro(~sebastian@72.252.244.10) has joined #tryton
2014-06-12 19:52 -!- bechamel1(~Adium@62-197-96-189.teledisnet.be) has joined #tryton
2014-06-12 20:12 -!- hiaselhans(~Thunderbi@212.186.45.207) has joined #tryton
2014-06-12 20:29 -!- hiaselhans(~Thunderbi@212.186.45.207) has joined #tryton
2014-06-12 22:02 -!- Telesight(~anthony@77-175-159-159.FTTH.ispfabriek.nl) has joined #tryton
2014-06-12 23:14 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton

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