Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
1877 Visualizzazioni

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

Avatar
Abbandona
Autore Risposta migliore

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

Avatar
Abbandona

Can you specify further?

Risposta migliore

@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
Abbandona