Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
1868 มุมมอง

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

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง

Can you specify further?

คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง