IRC logs of #tryton for Monday, 2017-11-27

chat.freenode.net #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@176.179.38.86) has joined #tryton01:36
-!- NeonKing(~Neonking@unaffiliated/neonking) has joined #tryton01:36
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton07:28
-!- JanGB(~jan@dslb-088-073-237-234.088.073.pools.vodafone-ip.de) has joined #tryton08:15
-!- JanGB(~jan@dslb-088-073-237-234.088.073.pools.vodafone-ip.de) has left #tryton08:15
-!- catonano(~user@151.50.142.71) has joined #tryton08:20
-!- rpit(~rpit@p200300C88BD1190056EE75FFFE0DD3C7.dip0.t-ipconnect.de) has joined #tryton08:41
-!- csotelo(~csotelo@179.7.42.182) has joined #tryton08:46
-!- mrichez(~smuxi@mail.saluc.com) 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@179.7.42.182) has joined #tryton10:12
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton10:44
-!- hedererjs(~hedererjs@dig50-1-78-222-206-45.fbx.proxad.net) 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: http://hg.tryton.org/modules/stock/file/ee9453f214dd/shipment.py#l14311:31
pokolis/on the contest/on the state/11:31
mrichezpokoli: in my case, state is the state of many2one model...11:33
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has left #tryton11:33
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) 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@151.50.142.71) has joined #tryton11:43
-!- mariomop(~quassel@host234.190-137-72.telecom.net.ar) has joined #tryton11:43
pokolicedk: have you seen https://bugs.tryton.org/msg36820 ?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@181.16.34.86) 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@179.43.97.56) has joined #tryton14:17
-!- thaneor(~ldlc6@179.26.10.35) has joined #tryton15:01
-!- thaneor(~ldlc6@r179-24-155-40.dialup.adsl.anteldata.net.uy) has joined #tryton15:17
-!- lukio(~lukio@200.68.72.41) has joined #tryton15:40
-!- andrespoliti(~andrespol@250-183-89-200.fibertel.com.ar) 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: http://doc.tryton.org/4.6/trytond/doc/topics/views/index.html?highlight=pre_validate#xml-description15:50
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
andrespolitithanks15:55
-!- mariomop(~quassel@host234.190-137-72.telecom.net.ar) has joined #tryton16:02
-!- smarro(~sebastian@181.16.34.86) has joined #tryton16:10
-!- cdchapman(~perturbed@73.98.169.160) has joined #tryton17:17
pokoliany idea which should cause https://drone.tryton.org/tryton/modules.account_invoice/22/14 ?17:18
cedkpokoli: I'm fixing the first error17:24
pokolicedk: ok, thanks17:42
cedkpokoli: seems to be fixed https://drone.tryton.org/tryton/modules.account_invoice/2317:42
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(~lukio@host126.186-109-85.telecom.net.ar) has joined #tryton18:07
cedkpokoli: is there a reason to not18:08
-!- smarro(~sebastian@181.16.34.86) has joined #tryton18:35
-!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton18:54
-!- cdchapman(~perturbed@73.98.169.142) 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(~lukio@host126.186-109-85.telecom.net.ar) has left #tryton23:08
-!- kobain(~kobain@unaffiliated/kobain) has joined #tryton23:19

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!