Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
5 Respostas
21592 Visualizações

Hi everybody,

I'm new to Odoo 10.

How can I add more item in the "Action" menu.

Example: In module Recruitment, when select multiple applicants, the Action menu (on Toolbar) have 2 items "Export" and "Delete". I'd like to add 1 more item as "Archive".

How can I do that?

Thank you

Avatar
Cancelar
Melhor resposta

Hello

check below link it's similar to your problem i hope it helps you

https://www.odoo.com/forum/help-1/question/how-to-add-a-new-action-menu-item-16786

Thanks

Avatar
Cancelar
Autor

Thanks for your answer,

But, your link does not help. I think you misunderstand my issue. I tried with this code:

<act_window name="Archive"

res_model="hr.applicant"

src_model="hr.applicant"

multi="True"

key2="client_action_multi"

id="archive_applicant"

/>

And the "Archive" item appears from "Action" dropdown, but it does not call to the function "archive_applicant" in hr.applicant

Melhor resposta

Because this is the #1 result on google right now, I want to share a video tutorial I found to create a custom action in the "action" menu. It also works for Odoo 13, when you do not include the "view_type" field.
Link: https://youtu.be/yGKYPtAeP7k

Avatar
Cancelar
Autor Melhor resposta

Resolved,

By adding this field to the tree view, then action "Archive" and "Unarchive" added.

<field name="active" invisible="1"/>

Strange.

 

Avatar
Cancelar

Bạn có thể nói rõ hơn về cách làm được không? Ví dụ trong Tree view của module Attendance mình muốn thêm tác vụ là tính trễ và tăng ca, thì làm sao để add vô được Action menu ở toolbar?

I suppose that it is a special behaviour for the "active" field, but it is not the solution for the any other field !