Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
1877 Vizualizări

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

Imagine profil
Abandonează
Autor Cel mai bun răspuns

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

Imagine profil
Abandonează

Can you specify further?

Cel mai bun răspuns

@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': {
}
}

Imagine profil
Abandonează