IRC logs of #tryton for Monday, 2017-11-27 #tryton log beginning Mon Nov 27 00:00:01 CET 2017
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton00:22
-!- kobain(~kobain@unaffiliated/kobain) has joined #tryton01:30
-!- NeonKing(~Neonking@ has joined #tryton01:36
-!- NeonKing(~Neonking@unaffiliated/neonking) has joined #tryton01:36
-!- Timitos( has joined #tryton07:28
-!- JanGB( has joined #tryton08:15
-!- JanGB( has left #tryton08:15
-!- catonano(~user@ has joined #tryton08:20
-!- rpit( has joined #tryton08:41
-!- csotelo(~csotelo@ has joined #tryton08:46
-!- mrichez( has joined #tryton08:58
-!- nicoe(~nicoe@2a02:578:858c:500:ee55:f9ff:fe7b:f7ac) has joined #tryton09:28
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton10:02
-!- csotelo(~csotelo@ has joined #tryton10:12
-!- Timitos( has joined #tryton10:44
-!- hedererjs( has joined #tryton10:49
mrichezhi, what's the best way to filter a Many2One ? is the filter option available too ?11:23
pokolimrichez: probably using a domain11:25
mrichezpokoli: with a domain, i get an error '... is not valid according to its domain..'11:27
mrichezi'm looking to filter a model on specific state...11:28
pokolimrichez: you can use a conditional domain depending on the contest11:30
pokolimrichez: for example, like done on the stock module:
pokolis/on the contest/on the state/11:31
mrichezpokoli: in my case, state is the state of many2one model...11:33
-!- Timitos( has left #tryton11:33
-!- Timitos( has joined #tryton11:33
pokolimrichez: so what do you want to filter?11:34
mrichezpokoli: in my case, i need to get purchase_requests in draft state...11:34
pokolimrichez: so if purchase request is the target model, just use [('state', '=', 'draft')] as domain11:35
mrichezpokoli: but state of the request will evolve and then i get error "not valid according to its domain" ... or this error is not linked to the domain ?11:36
pokolimrichez: that's why we add a state on the source model, to only apply the filter "on the first version of the evolution" :)11:39
pokoliindeed, the error will only be raised if you modify the field or any of it's dependendant fields11:39
mrichezpokoli: ok, will try with conditional domain..11:42
mrichezpokoli: thanks !11:42
-!- catonano(~user@ has joined #tryton11:43
-!- mariomop( has joined #tryton11:43
pokolicedk: have you seen ?12:52
cedkpokoli: what do you mean?13:01
pokolicedk: I doubt if it's relly required to explicity list all depends fields13:02
pokolicedk: probably we can add automatically the fields as depends without forcing the developer to list them manually13:02
-!- smarro(~sebastian@ has joined #tryton13:03
cedkpokoli: I commented in review. We should remove the test because any depends on the buttons are strictly needed.13:05
pokolicedk: then better to test only for unknown depends13:08
cedkpokoli: yes probably13:09
-!- csotelo_at_work(~csotelo@ has joined #tryton14:17
-!- thaneor(~ldlc6@ has joined #tryton15:01
-!- thaneor( has joined #tryton15:17
-!- lukio(~lukio@ has joined #tryton15:40
-!- andrespoliti( has joined #tryton15:40
andrespolitihello, is there a way of triggering a validation of a one2many element when the accept button is pressed, instead of when the parent is saved?15:41
cedkandrespoliti: you can use pre_validate:
andrespoliticedk: that pre_validate can be used on custom buttons, but how can i trigger it when pressing the accept button?15:53
andrespolitiooh, i see what you meant15:54
-!- mariomop( has joined #tryton16:02
-!- smarro(~sebastian@ has joined #tryton16:10
-!- cdchapman(~perturbed@ has joined #tryton17:17
pokoliany idea which should cause ?17:18
cedkpokoli: I'm fixing the first error17:24
pokolicedk: ok, thanks17:42
cedkpokoli: seems to be fixed
pokolicedk: everything ok now. Thanks17:50
pokoliis there any reason to change the statement name and date once it has been posted?17:50
-!- lukio( has joined #tryton18:07
cedkpokoli: is there a reason to not18:08
-!- smarro(~sebastian@ has joined #tryton18:35
-!- Telesight( has joined #tryton18:54
-!- cdchapman(~perturbed@ has joined #tryton20:11
-!- nicoe(~nicoe@2a02:578:858c:500:ee55:f9ff:fe7b:f7ac) has joined #tryton20:51
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton21:57
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton22:01
-!- lukio( has left #tryton23:08
-!- kobain(~kobain@unaffiliated/kobain) has joined #tryton23:19

Generated by 2.11.0 by Marius Gedminas - find it at!