0
votes

I'm creating a new module where I want to put a button in kanban view of Contact screen. When any user click on that button I need active_id of the selected contact. It is possible to get for tree and form view but I don't know how to do that for kanban view.

Can anyone please help here?

Thanks

1

1 Answers

0
votes

You need to use the contex dictionary variably for this purpose ,

If you click on the bu

<button string="Click Me" type="object" name="my_func" context="{'active' : active_id}" />

Method:

def my_func(self, cr, uid, ids, context={}):
    # do stuff using the info passed in the context variable...