IRC logs of #tryton for Monday, 2015-10-05

chat.freenode.net #tryton log beginning Mon Oct 5 00:00:01 CEST 2015
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton00:24
-!- smarro(~sebastian@181.16.4.44) has joined #tryton01:23
-!- yangoon1(~mathiasb@p549F1345.dip0.t-ipconnect.de) has joined #tryton07:01
-!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton07:31
-!- frispete(~frispete@p54A91FE2.dip0.t-ipconnect.de) has joined #tryton07:40
-!- rpit(~rpit@2a02:908:e670:3a80:b54d:391c:e614:8bad) has joined #tryton08:02
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton08:17
-!- udono(~udono@ip-178-202-238-79.hsi09.unitymediagroup.de) has joined #tryton08:17
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton08:57
-!- aroncero__(~aroncero@86.63.19.153) has joined #tryton09:00
-!- albertca(~albert@142.Red-2-139-177.staticIP.rima-tde.net) has joined #tryton09:15
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:16
-!- vcardon(~vcardon@bureau-sdsl.tranquil.it) has joined #tryton09:21
-!- pokoli(~pokoli@unaffiliated/pokoli) has joined #tryton09:30
-!- jvblasco(~seba@62.43.196.37) has joined #tryton09:32
-!- tbruyere(~smuxi@mail.saluc.com) has joined #tryton09:47
-!- tbruyere(~smuxi@mail.saluc.com) has joined #tryton09:51
-!- nicoe(~nicoe@balisto.wifi.b2ck.com) has joined #tryton09:54
-!- tbruyere(~smuxi@mail.saluc.com) has joined #tryton10:00
aronceroHi, I want to open a form from a button in a tree view11:00
aronceroIf the action is from the same model, i use11:00
aroncero@ModelView.button_action('model.action_id') in the function11:00
aronceroAnd it works fine11:00
aronceroBut How can I use a function with @ModelView.button to return a other model action id?11:00
aronceroAccording to documentation:11:01
aroncerobutton(cls, records)11:01
aronceroThe function may return an ir.action id ...11:01
aroncerobut if i return 'other_model.action_id' nothing happens11:01
aroncerowhat am I doing wrong?11:01
pokoliaroncero: AFAIU you should return the action id as integer, not the ModelData representation of it11:03
aronceropokoli: ahhh11:03
aronceropokoli: So i must use the pool to search it, no?11:04
pokoliSo Pool().get('ir.model.data').get_id('module', 'xml_id') should work :)11:04
pokoliaroncero: yes, there is the get_id function on ir.model.data in order to convert xml_id to database_id11:04
pokoliaroncero: and you should use the function as there is a cache for it ;)11:05
aronceropokoli: do you know any module that use it? to use an example11:09
pokoliaroncero: I don't remeber it, but a simple grep should point you to the example ;)11:11
aronceroThanks11:12
cedkaroncero: but the button_action does it because it is syntax is '<module>.<xml id>' just like ModelData.get_id11:18
aroncerocedk: ok, I think I undertand it11:21
aronceropokoli, cedk: Thanks, it works perfect :D11:26
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton12:21
-!- mariomop(~quassel@181.90.76.68) has joined #tryton12:45
-!- aroncero(~aroncero@86.63.19.153) has joined #tryton13:18
-!- aroncero_(~aroncero@86.63.19.153) has joined #tryton13:26
-!- kstenger(~karla@r167-59-46-17.dialup.adsl.anteldata.net.uy) has joined #tryton15:11
-!- den2204(~mahon@178.141.255.129) has joined #tryton15:13
-!- bvillasanti(~bvillasan@190.105.65.239) has joined #tryton15:31
-!- kstenger(~karla@r167-59-13-61.dialup.adsl.anteldata.net.uy) has joined #tryton15:35
-!- juanfe(~juanfe@190.85.115.49) has joined #tryton16:00
-!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton16:07
-!- aroncero(~cristina@86.63.19.153) has joined #tryton16:52
aronceroHi17:01
aronceroI am looking for documentation about actions and keywords.17:01
aronceroI saw that there are ir.action.act_window ir.action.act_window.view ir.action.act_window.domain,17:02
aroncero...17:02
aroncerowhere can i read about that?17:02
cedkpokoli: will you commit account patch?17:04
pokolicedk: yes, in 10 or 20 minutes moreless17:04
cedkaroncero: I think we don't have17:05
cedkaroncero: looking at the Models should help to understand17:09
cedkaroncero: otherwise ask here any questions17:10
pokolicedk: commited patches17:12
pokoliaroncero: a patch improving the docs will be very welcomed :)17:21
aronceropokoli: I agree, I will try to understand it and make some documentation with examples17:27
pokoliaroncero: feel free to ask whatever you don't understand here17:30
-!- michael-kohlhaas(~michael-k@unaffiliated/michael-kohlhaas) has joined #tryton17:47
-!- smarro(~sebastian@114-115-235-201.fibertel.com.ar) has joined #tryton18:11
-!- bvillasanti(~bvillasan@190.105.65.239) has joined #tryton18:22
-!- bvillasanti(~bvillasan@190.105.65.239) has joined #tryton18:29
aronceroA ir.action.act_window.view is related with a view and an action.act_window18:32
aronceroIs that a method to say to the action which specific view (form o tree) use?18:32
cedkaroncero: yes18:34
cedkaroncero: and the sequence define the order18:34
aroncerobut I tried using that action in a button function but i received an error18:36
aronceroYou try to read records that don't exist anymore.18:36
aroncero(Document type: ir.action)18:36
cedkaroncero: you must give the id of the ir.action not the ir.action.act_window18:37
aroncerocedk: return Pool().get('ir.model.data').get_id('service_email', 'act_service_email_form_view1')18:39
aroncerocedk: http://pastebin.com/HfY9pypd18:41
cedkaroncero: that's a view not an ir.action.act_window18:43
aroncerocedk: it is a ir.action.act_window.view18:45
aroncerocedk: <record model="ir.action.act_window.view" id="act_service_email_form_view1">18:45
cedkaroncero: yes it is what I said18:45
cedkaroncero: it is a view not an act_window18:46
aroncerocedk: ok, i think that a ir.action.act_window.view is a ir.action.act_window that open a specific view18:47
cedkaroncero: not it is a view18:49
aroncerocedk: ok... So an ir.action.act_window.view is the view that the action must open18:54
cedkaroncero: yes18:55
-!- mariomop(~quassel@200.117.223.192) has joined #tryton18:56
aroncerocedk: Thanks18:57
-!- vcardon(~vcardon@bureau-sdsl.tranquil.it) has left #tryton19:07
-!- pablovannini(~pablo@181.47.148.245) has joined #tryton19:50
-!- rpit(~rpit@2a02:908:e670:3a80:6e:7b6a:3e1d:61ff) has joined #tryton20:07
-!- bvillasanti(~bvillasan@190.105.65.239) has joined #tryton20:14
-!- bvillasanti(~bvillasan@190.105.65.239) has joined #tryton20:16
-!- bvillasanti(~bvillasan@190.105.65.239) has joined #tryton20:46
-!- bvillasanti(~bvillasan@190.105.65.239) has joined #tryton21:23
-!- bvillasanti(~bvillasan@190.105.65.239) has joined #tryton22:32
-!- bechamel(~Adium@host-85-201-150-194.dynamic.voo.be) has joined #tryton22:38

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