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

I have found several posts that states that it's possible to modify the parameters of an action from a custom module the following way:

for the action open_create_project in the module project

<record id="open_create_project" model="ir.actions.act_window">

<field name="name">Create a Project</field>
<field name="res_model">project.project</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="project_project_view_form_simplified"/>
<field name="target">new</field>
</record>

to modifiy it we create an action with an id such as original_module.id_of_the_action, so project.open_create_project in this case.

    <record id="project.open_create_project" model="ir.actions.act_window">
        <field name="name">New name for the action</field>
     </record>

And then we can add the fields that we want to change.


But I didn't found anything regarding this in the documentation of odoo. When I tried it it seems to work at first, but after another update of the custom module the change of the name seems to disappear sudently. So is this something that is supported or just a kind of hack that should be avoided?

아바타
취소
베스트 답변

Hi Francois,

This is standard practice in Odoo.

Just make sure that your module depends on the project module, otherwise if the project module is updated, it will refresh without your modules changes.

Also just make sure the file hasn't been removed from the manifest, I know it's happened to me on more than one occasion.

Cheers,
Jake Robinson

아바타
취소
관련 게시물 답글 화면 활동
1
9월 19
4461
0
8월 19
4259
3
11월 20
12216
1
6월 20
2910
0
9월 19
3516