Skip to Content
Menu
This question has been flagged
2 Replies
1542 Views

Hi , is  there  any  solution  available  or  any  idea  how  i  can  add attachment button in Kanban view. 

Avatar
Discard
Author Best Answer

Finally done. I had to work on window action and menu item. 

Avatar
Discard

Can you specify further?

Best Answer

@Ricaordo Gross

XML
-------------------


\\ \ \ \ \ \ \ data\-name\=\"return_action_to_open\"\ href\=\"\#\"\
\ \ \ \ \ \ \ class\=\"oe_kanban_action\ oe_kanban_action_a\"\
\ \ \ \ \ \ \ data\-context\=\"\{\'action\'\:\'my_module_name\.my_action_external_id\'\}\"\>

Public Attachments
class="fa fa-book" t-att-style="'color:lightslategray;'" role="img"
aria-label="Warning: non attachment added"
title="Warning: non attachment added">

class="fa fa-book" t-att-style="'color:dodgerblue;'" role="img"
aria-label="Public Building attachment added."
title="Public Building attachment added.">




PYTHON
--------------

def return_action_to_open(self, context=None):
action_id = self.env.ref(context.get('action'))
return {
'name': action_id.name,
'type': action_id.type,
'view_mode': 'form',
'res_model': action_id.res_model,
'target': 'new',
'domain': [],
'context': {
}
}

Avatar
Discard