[UPD] update flow input hlidays ind
This commit is contained in:
131
gmn_freshservice/views/gmn_freshservice_holiday_views_v01.xml
Normal file
131
gmn_freshservice/views/gmn_freshservice_holiday_views_v01.xml
Normal file
@@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- LIST VIEW HARI LIBUR & CUTI BERSAMA -->
|
||||
<record id="view_freshservice_holiday_list" model="ir.ui.view">
|
||||
<field name="name">freshservice.holiday.list</field>
|
||||
<field name="model">freshservice.holiday</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Daftar Hari Libur & Cuti Bersama" default_order="date desc">
|
||||
<header>
|
||||
<button name="action_open_import_wizard"
|
||||
string="Impor Excel"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
icon="fa-upload"
|
||||
display="always"/>
|
||||
<button name="action_download_template"
|
||||
string="Download Template Excel"
|
||||
type="object"
|
||||
class="btn-secondary"
|
||||
icon="fa-download"
|
||||
display="always"/>
|
||||
<button name="action_populate_default_holidays"
|
||||
string="Muat Libur Baku (2024-2026)"
|
||||
type="object"
|
||||
class="btn-outline-secondary"
|
||||
icon="fa-calendar-check-o"
|
||||
display="always"/>
|
||||
</header>
|
||||
<field name="date" string="Tanggal Libur"/>
|
||||
<field name="name" string="Nama Hari Libur / Deskripsi"/>
|
||||
<field name="holiday_type"
|
||||
widget="badge"
|
||||
decoration-danger="holiday_type == 'public'"
|
||||
decoration-info="holiday_type == 'joint_leave'"
|
||||
decoration-warning="holiday_type == 'company'"/>
|
||||
<field name="year" string="Tahun" optional="show"/>
|
||||
<field name="notes" string="Catatan" optional="show"/>
|
||||
<field name="active" widget="boolean_toggle" string="Aktif" optional="show"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- FORM VIEW HARI LIBUR & CUTI BERSAMA -->
|
||||
<record id="view_freshservice_holiday_form" model="ir.ui.view">
|
||||
<field name="name">freshservice.holiday.form</field>
|
||||
<field name="model">freshservice.holiday</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Hari Libur & Cuti Bersama">
|
||||
<header>
|
||||
<button name="action_open_import_wizard"
|
||||
string="Impor Excel"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
icon="fa-upload"/>
|
||||
<button name="action_download_template"
|
||||
string="Download Template Excel"
|
||||
type="object"
|
||||
class="btn-secondary"
|
||||
icon="fa-download"/>
|
||||
<button name="action_populate_default_holidays"
|
||||
string="Muat Libur Baku (2024-2026)"
|
||||
type="object"
|
||||
class="btn-outline-secondary"
|
||||
icon="fa-calendar-check-o"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<label for="name" string="Nama Hari Libur"/>
|
||||
<h1>
|
||||
<field name="name" placeholder="misal: Hari Raya Idul Fitri 1447 H"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group string="Waktu & Klasifikasi">
|
||||
<field name="date"/>
|
||||
<field name="holiday_type" widget="radio"/>
|
||||
<field name="year" readonly="1"/>
|
||||
<field name="active" widget="boolean_toggle"/>
|
||||
</group>
|
||||
<group string="Keterangan & Legalitas">
|
||||
<field name="notes" placeholder="misal: SKB 3 Menteri No. 1017 Tahun 2024..."/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- SEARCH VIEW HARI LIBUR & CUTI BERSAMA -->
|
||||
<record id="view_freshservice_holiday_search" model="ir.ui.view">
|
||||
<field name="name">freshservice.holiday.search</field>
|
||||
<field name="model">freshservice.holiday</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Cari Hari Libur">
|
||||
<field name="name" string="Nama / Deskripsi"/>
|
||||
<field name="date" string="Tanggal"/>
|
||||
<field name="year" string="Tahun"/>
|
||||
<filter name="filter_active" string="Aktif" domain="[('active', '=', True)]"/>
|
||||
<filter name="filter_public" string="Hari Libur Nasional" domain="[('holiday_type', '=', 'public')]"/>
|
||||
<filter name="filter_joint" string="Cuti Bersama" domain="[('holiday_type', '=', 'joint_leave')]"/>
|
||||
<filter name="filter_company" string="Libur Khusus Perusahaan" domain="[('holiday_type', '=', 'company')]"/>
|
||||
<separator/>
|
||||
<filter name="filter_2026" string="Tahun 2026" domain="[('year', '=', 2026)]"/>
|
||||
<filter name="filter_2025" string="Tahun 2025" domain="[('year', '=', 2025)]"/>
|
||||
<filter name="filter_2024" string="Tahun 2024" domain="[('year', '=', 2024)]"/>
|
||||
<group>
|
||||
<filter name="group_by_year" string="Tahun" context="{'group_by': 'year'}"/>
|
||||
<filter name="group_by_type" string="Jenis Libur" context="{'group_by': 'holiday_type'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ACTION WINDOW HARI LIBUR -->
|
||||
<record id="action_freshservice_holiday" model="ir.actions.act_window">
|
||||
<field name="name">Hari Libur & Cuti Bersama</field>
|
||||
<field name="res_model">freshservice.holiday</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="view_freshservice_holiday_search"/>
|
||||
<field name="context">{'search_default_filter_active': 1, 'search_default_group_by_year': 1}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Belum ada data hari libur atau cuti bersama yang terdaftar.
|
||||
</p>
|
||||
<p>
|
||||
Klik tombol <b>Muat Libur Baku (2024-2026)</b> untuk langsung memuat data hari libur nasional Indonesia,
|
||||
atau klik <b>Impor Excel</b> untuk mengunggah jadwal hari libur custom perusahaan Anda.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -46,4 +46,16 @@ action = model.action_open_and_fetch_tickets()
|
||||
parent="menu_freshservice_config_parent"
|
||||
action="action_freshservice_config_settings"
|
||||
sequence="10"/>
|
||||
|
||||
<menuitem id="menu_freshservice_holiday"
|
||||
name="Hari Libur & Cuti Bersama"
|
||||
parent="menu_freshservice_config_parent"
|
||||
action="action_freshservice_holiday"
|
||||
sequence="20"/>
|
||||
|
||||
<menuitem id="menu_freshservice_holiday_import_wizard"
|
||||
name="Impor Hari Libur (Excel)"
|
||||
parent="menu_freshservice_config_parent"
|
||||
action="action_freshservice_holiday_import_wizard"
|
||||
sequence="25"/>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user