Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3354 Widoki

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?

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
wrz 19
4077
0
sie 19
3885
3
lis 20
11819
1
cze 20
2620
0
wrz 19
3279