Skip to Content
Menu
This question has been flagged
1 Reply
2174 Views

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
Discard
Best Answer

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
Discard
Related Posts Replies Views Activity
1
Sep 19
3013
0
Aug 19
2850
3
Nov 20
10245
1
Jun 20
1740
0
Sep 19
2478