Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
3338 Tampilan

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?

Avatar
Buang
Jawaban Terbai

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

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Sep 19
4055
0
Agu 19
3872
3
Nov 20
11797
1
Jun 20
2606
0
Sep 19
3261