Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
486 Vistas

When user approve the time off type, system will write "Home Working" (yellow highlighted) in the log. It should be "Time Off Request". Do you know where I can update this message? 

THANKS A LOT.

Avatar
Descartar
Mejor respuesta

Hi,

Yes, the log message showing “Home Working” comes from the Work Entry Type linked to the Time Off Type. In your case, the record:


<record id="work_entry_type_home_working" model="hr.work.entry.type">

    <field name="name">Home Working</field>

    <field name="code">WORK110</field>

    <field name="color">2</field>

    <field name="is_leave">True</field>

</record>


is part of the core data, and its name is what's displayed in the system logs (such as approval messages or work entry generation).


How to Change It:

If you want the log to show "Time Off Request" instead of "Home Working", you need to override the name of this core record. You can do this safely in your custom module like this:


xml:

<odoo>

    <data noupdate="0">

        <record id="work_entry_type_home_working" model="hr.work.entry.type">

            <field name="name">Time Off Request</field>

        </record>

    </data>

</odoo>


This will update the display name used across the system, including logs and generated work entries, without modifying any core files.


Hope it helps.

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
ago 25
129
1
ago 25
734
2
ago 25
333
3
ago 25
1075
1
ago 25
624