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

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
2
Agu 25
162
1
Agu 25
749
2
Agu 25
341
3
Agu 25
1085
1
Agu 25
634