IRC logs of #tryton for Thursday, 2014-06-12 #tryton log beginning Thu Jun 12 00:00:01 CEST 2014
-!- frispete( has joined #tryton01:07
-!- digitalsatori(~Thunderbi@ has joined #tryton01:35
-!- digitalsatori(~Thunderbi@ has joined #tryton03:29
-!- digitalsatori(~Thunderbi@ has joined #tryton04:08
-!- digitalsatori(~Thunderbi@ has joined #tryton05:34
-!- frispete_( has joined #tryton06:40
-!- LordVan(~LordVan@gentoo/developer/LordVan) has joined #tryton07:04
-!- yangoon( has joined #tryton07:17
-!- grasbauer( has joined #tryton07:28
-!- bechamel( has joined #tryton07:52
-!- rpit( has joined #tryton07:57
-!- mar( has joined #tryton08:47
maris it possible to add filter by origin?08:47
marI have Many2One select, I want filter in the popup08:48
maror maybe it's possible to create custom filters?08:48
grasbauermar: add a domain
maris it going to "optimize" query?08:55
grasbauermar: how optimize?08:56
mari mean it will not make million queries when referencing origin in list?08:57
-!- jeancavallo( has joined #tryton09:00
grasbauermar: 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 ...09:01
marwhat I want to do is filter moves by purchase id09:20 = x  (purchase.line)09:20
marso 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 row09:21
grasbauermar: don't understand right now: which moves? stock.moves?09:22
grasbauermar: purchase is already linked to stock.moves09:24
grasbauermar: purchase.moves09:24
marbut I'm doing it from stock.move POV09:26
grasbauermar: also stock.move has a function field to get the related purchase09:27
marok thanks09:28
-!- vcardon( has joined #tryton09:28
grasbauermar: take a look to modules/purchase/ - there  are function fields that will get all relevant informations about the purchase09:30
-!- nicoe(~nicoe@ has joined #tryton09:37
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:40
pokolicedk: didn't understand how i broke the test by my change, but i will have a look today09:54
cedkpokoli: it reveals the broken tests09:54
pokolicedk: so that was the objective :)09:55
-!- bechamel( has joined #tryton09:56
cedkbechamel: did you remember why we choose the convert in the search bar: 1..2 -> >= 1, < 210:00
bechamelcedk: no, as usual I forget those kind of stuffs10:01
bechamelor maybe it is to reflect the python range() behaviour10:03
pokolicedk: the issue is that the test needs a rollback on transaction11:27
pokolicedk: this should not be done automatically by trytond, don't it?11:28
cedkpokoli: no the problem is once a query fails all the transaction is corrupted and should be closed11:29
cedkpokoli: indeed the test should be rewritten to make one exception test per transaction11:30
cedkI though we could maybe use save points between each query but I think it will have performance issue11:30
cedkbut it will be a good thing to test as sometimes we have to do a lot of contorsion because of that11:31
pokolioks, so I will rewrite the test11:33
pokolicedk: for me save points performance is not relevant to tests :)11:34
pokolicedk: I don't get any use case where I wan't a save point in a tryton transaction, will comment if i encounter one11:35
cedkpokoli: the test doesn't need previous data?11:47
cedkpokoli: I don't think I understand your point on save points11:47
pokolicedk: no, the test doesn't need previous data as it only creates new triggers11:54
pokolicedk: only references to models, but they exist before11:54
pokolicedk: what i said about savepoints is i can't image an use case where a save_point is needed inside a tryton transaction11:55
cedkpokoli: I do something and the query fails, I now want to show a proper error message so I need to query the translation table11:59
pokolicedk: AFAIU currently this is managed with a new cursor, so the point if it's better to use a save_point or a new cursor12:05
cedkpokoli: yes12:08
cedkpokoli: but if we have save point, perhaps new feature could be done12:09
-!- littlebit( has joined #tryton12:53
-!- kstenger(~karla@ has joined #tryton13:04
-!- ronaldm(~ronaldm@ has joined #tryton13:12
maris 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.13:12
pokolimar: sure, just call the wizard from the button, and write to active_ids13:21
maris there any example somewhere so I could look up the code?13:21
mari mean some default module13:22
pokolimar: i don't get any in mind by now13:22
pokolimar: if you just post your existing code on pastebin I can help you :)13:31
mari figured out I formulated my question wrong13:37
marlets try again. not an actual example but:13:39
marI'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 appears13:40
marimportant thing is that invoice lines doesn't exist in database yet13:42
marI want to create them dynamically13:42
marcan I do that?13:42
cedkmar: use purchase_invoice_line_standalone module13:49
marcedk, it's not real use case, but I want to do something like this in my custom module13:49
pokolimar: you need to link invoice_lines with purchase_lines? or what you're trying to achive?13:58
marI want to create lines into One2Many edit field depending on other object that I select14:00
mar"autocomplete" One2Many field depending on selected object from wizard ;)14:05
cedkmar: for me it is not possible currently to do it properly14:09
pokolimar: I'm pretty sure that another way of doing it will exist :)15:03
marcan u suggest one ?15:04
pokolimar: no because I still don't understand what you are trying to achieve15:05
jeancavallomar: 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 list15:10
cedkthat's probably a bad design because you put a static field for dynamic behavior15:16
-!- smarro( has joined #tryton15:19
-!- alisonken1lap3( has joined #tryton17:28
-!- Telesight( has joined #tryton18:09
-!- vcardon( has left #tryton19:08
-!- smarro(~sebastian@ has joined #tryton19:42
-!- bechamel1( has joined #tryton19:52
-!- hiaselhans(~Thunderbi@ has joined #tryton20:12
-!- hiaselhans(~Thunderbi@ has joined #tryton20:29
-!- Telesight( has joined #tryton22:02
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton23:14

Generated by 2.11.0 by Marius Gedminas - find it at!