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

chat.freenode.net #tryton log beginning Mon Nov 27 00:00:01 CET 2017
2017-11-27 00:22 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2017-11-27 01:30 -!- kobain(~kobain@unaffiliated/kobain) has joined #tryton
2017-11-27 01:36 -!- NeonKing(~Neonking@176.179.38.86) has joined #tryton
2017-11-27 01:36 -!- NeonKing(~Neonking@unaffiliated/neonking) has joined #tryton
2017-11-27 07:28 -!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton
2017-11-27 08:15 -!- JanGB(~jan@dslb-088-073-237-234.088.073.pools.vodafone-ip.de) has joined #tryton
2017-11-27 08:15 -!- JanGB(~jan@dslb-088-073-237-234.088.073.pools.vodafone-ip.de) has left #tryton
2017-11-27 08:20 -!- catonano(~user@151.50.142.71) has joined #tryton
2017-11-27 08:41 -!- rpit(~rpit@p200300C88BD1190056EE75FFFE0DD3C7.dip0.t-ipconnect.de) has joined #tryton
2017-11-27 08:46 -!- csotelo(~csotelo@179.7.42.182) has joined #tryton
2017-11-27 08:58 -!- mrichez(~smuxi@mail.saluc.com) has joined #tryton
2017-11-27 09:28 -!- nicoe(~nicoe@2a02:578:858c:500:ee55:f9ff:fe7b:f7ac) has joined #tryton
2017-11-27 10:02 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2017-11-27 10:12 -!- csotelo(~csotelo@179.7.42.182) has joined #tryton
2017-11-27 10:44 -!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton
2017-11-27 10:49 -!- hedererjs(~hedererjs@dig50-1-78-222-206-45.fbx.proxad.net) has joined #tryton
2017-11-27 11:23 <mrichez> hi, what's the best way to filter a Many2One ? is the filter option available too ?
2017-11-27 11:25 <pokoli> mrichez: probably using a domain
2017-11-27 11:27 <mrichez> pokoli: with a domain, i get an error '... is not valid according to its domain..'
2017-11-27 11:28 <mrichez> i'm looking to filter a model on specific state...
2017-11-27 11:30 <pokoli> mrichez: you can use a conditional domain depending on the contest
2017-11-27 11:31 <pokoli> mrichez: for example, like done on the stock module: http://hg.tryton.org/modules/stock/file/ee9453f214dd/shipment.py#l143
2017-11-27 11:31 <pokoli> s/on the contest/on the state/
2017-11-27 11:33 <mrichez> pokoli: in my case, state is the state of many2one model...
2017-11-27 11:33 -!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has left #tryton
2017-11-27 11:33 -!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton
2017-11-27 11:34 <pokoli> mrichez: so what do you want to filter?
2017-11-27 11:34 <mrichez> pokoli: in my case, i need to get purchase_requests in draft state...
2017-11-27 11:35 <pokoli> mrichez: so if purchase request is the target model, just use [('state', '=', 'draft')] as domain
2017-11-27 11:36 <mrichez> pokoli: 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 ?
2017-11-27 11:39 <pokoli> mrichez: that's why we add a state on the source model, to only apply the filter "on the first version of the evolution" :)
2017-11-27 11:39 <pokoli> indeed, the error will only be raised if you modify the field or any of it's dependendant fields
2017-11-27 11:42 <mrichez> pokoli: ok, will try with conditional domain..
2017-11-27 11:42 <mrichez> pokoli: thanks !
2017-11-27 11:43 -!- catonano(~user@151.50.142.71) has joined #tryton
2017-11-27 11:43 -!- mariomop(~quassel@host234.190-137-72.telecom.net.ar) has joined #tryton
2017-11-27 12:52 <pokoli> cedk: have you seen https://bugs.tryton.org/msg36820 ?
2017-11-27 13:01 <cedk> pokoli: what do you mean?
2017-11-27 13:02 <pokoli> cedk: I doubt if it's relly required to explicity list all depends fields
2017-11-27 13:02 <pokoli> cedk: probably we can add automatically the fields as depends without forcing the developer to list them manually
2017-11-27 13:03 -!- smarro(~sebastian@181.16.34.86) has joined #tryton
2017-11-27 13:05 <cedk> pokoli: I commented in review. We should remove the test because any depends on the buttons are strictly needed.
2017-11-27 13:08 <pokoli> cedk: then better to test only for unknown depends
2017-11-27 13:09 <cedk> pokoli: yes probably
2017-11-27 14:17 -!- csotelo_at_work(~csotelo@179.43.97.56) has joined #tryton
2017-11-27 15:01 -!- thaneor(~ldlc6@179.26.10.35) has joined #tryton
2017-11-27 15:17 -!- thaneor(~ldlc6@r179-24-155-40.dialup.adsl.anteldata.net.uy) has joined #tryton
2017-11-27 15:40 -!- lukio(~lukio@200.68.72.41) has joined #tryton
2017-11-27 15:40 -!- andrespoliti(~andrespol@250-183-89-200.fibertel.com.ar) has joined #tryton
2017-11-27 15:41 <andrespoliti> hello, 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?
2017-11-27 15:50 <cedk> andrespoliti: you can use pre_validate: http://doc.tryton.org/4.6/trytond/doc/topics/views/index.html?highlight=pre_validate#xml-description
2017-11-27 15:53 <andrespoliti> cedk: that pre_validate can be used on custom buttons, but how can i trigger it when pressing the accept button?
2017-11-27 15:54 <andrespoliti> ooh, i see what you meant
2017-11-27 15:55 <andrespoliti> thanks
2017-11-27 16:02 -!- mariomop(~quassel@host234.190-137-72.telecom.net.ar) has joined #tryton
2017-11-27 16:10 -!- smarro(~sebastian@181.16.34.86) has joined #tryton
2017-11-27 17:17 -!- cdchapman(~perturbed@73.98.169.160) has joined #tryton
2017-11-27 17:18 <pokoli> any idea which should cause https://drone.tryton.org/tryton/modules.account_invoice/22/14 ?
2017-11-27 17:24 <cedk> pokoli: I'm fixing the first error
2017-11-27 17:42 <pokoli> cedk: ok, thanks
2017-11-27 17:42 <cedk> pokoli: seems to be fixed https://drone.tryton.org/tryton/modules.account_invoice/23
2017-11-27 17:50 <pokoli> cedk: everything ok now. Thanks
2017-11-27 17:50 <pokoli> is there any reason to change the statement name and date once it has been posted?
2017-11-27 18:07 -!- lukio(~lukio@host126.186-109-85.telecom.net.ar) has joined #tryton
2017-11-27 18:08 <cedk> pokoli: is there a reason to not
2017-11-27 18:35 -!- smarro(~sebastian@181.16.34.86) has joined #tryton
2017-11-27 18:54 -!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton
2017-11-27 20:11 -!- cdchapman(~perturbed@73.98.169.142) has joined #tryton
2017-11-27 20:51 -!- nicoe(~nicoe@2a02:578:858c:500:ee55:f9ff:fe7b:f7ac) has joined #tryton
2017-11-27 21:57 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2017-11-27 22:01 -!- semarie(~semarie@unaffiliated/semarie) has joined #tryton
2017-11-27 23:08 -!- lukio(~lukio@host126.186-109-85.telecom.net.ar) has left #tryton
2017-11-27 23:19 -!- kobain(~kobain@unaffiliated/kobain) has joined #tryton

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