Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
1870 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ

Can you specify further?

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ