콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
5 답글
21654 화면

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

아바타
취소
베스트 답변

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

아바타
취소
작성자

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

베스트 답변

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

아바타
취소
작성자 베스트 답변

Resolved,

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

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

Strange.

 

아바타
취소

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 !