Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
484 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
srp 25
122
1
srp 25
731
2
srp 25
330
3
srp 25
1067
1
srp 25
618