On Wed, Dec 6, 2017 at 1:56 PM, Cédric Krier <cedric.kr...@b2ck.com> wrote:
> On 2017-12-06 09:56, Khurram Shahzad wrote: > > On Tue, Dec 5, 2017 at 11:12 PM, Cédric Krier <cedric.kr...@b2ck.com> > wrote: > > > > > On 2017-12-04 13:15, Khurram Shahzad wrote: > > > > How can I open a record from button's click event in order to > view/edit > > > > this record? > > > > > > Have you considered to use a Many2One? > > > > > > > The idea is good; but I want to run some code which will show the record > > only if a certain condition is met. > > If the code is simple enough you can use the invisible state with a > PYSON expression. > Thanks; that's cool too! > > > Otherwise you must use a wizard that return an action window with the > > > record id in res_id. You can find an example in CreateMove.do_open_ of > > > account module. > > > > > I have used this method, but, it requires a lot of coding effort! I was > > looking for returning the action with res_id from the button's > > click-handler. > > Action are generic so we made balanced choices between simple usage and > complex. So yes it requires some code. > > -- Regards, Khurram. -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/CAM3N3CyDVa2ruysUqoKQSz8aCtQkmmTVk0UPy_8edYKdbpJ%2BtA%40mail.gmail.com.