summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views
diff options
context:
space:
mode:
authorMqdd <ahmadmiqdad27@gmail.com>2026-03-08 21:37:10 +0700
committerMqdd <ahmadmiqdad27@gmail.com>2026-03-08 21:37:10 +0700
commit54219f08d0269ba7f33445aa0da18e1f19aed5c3 (patch)
tree9b5665c78a6d996df313a0af1ed4a0ed8ca7c5a1 /indoteknik_custom/views
parenta26ef24a074523af5f517903e7aef4271ef5ff64 (diff)
<Miqdad> ganti jam logic
Diffstat (limited to 'indoteknik_custom/views')
-rw-r--r--indoteknik_custom/views/upah_harian_office_views.xml92
1 files changed, 74 insertions, 18 deletions
diff --git a/indoteknik_custom/views/upah_harian_office_views.xml b/indoteknik_custom/views/upah_harian_office_views.xml
index f8260552..a88a1e66 100644
--- a/indoteknik_custom/views/upah_harian_office_views.xml
+++ b/indoteknik_custom/views/upah_harian_office_views.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
- <!-- View upah.harian.office View Tree -->
+ <!-- ================= TREE ================= -->
<record id="view_upah_harian_tree" model="ir.ui.view">
<field name="name">view.upah.harian.tree</field>
<field name="model">upah.harian</field>
@@ -15,92 +15,148 @@
</field>
</record>
- <!-- View upah.harian.office form -->
+
+ <!-- ================= FORM ================= -->
<record id="view_upah_harian_form" model="ir.ui.view">
<field name="name">view.upah.harian.form</field>
<field name="model">upah.harian</field>
<field name="arch" type="xml">
+
<form string="Upah Harian Office">
+
<header>
- <button name="action_create_journal_entries" class="btn-primary" type="object" string="Create Journal Entries" attrs="{'invisible': [('state', 'not in', ['done'])]}"/>
+
+ <button name="action_create_journal_entries" class="btn-primary" type="object" string="Create Journal Entries" attrs="{'invisible': [('state', 'not in', ['approved'])]}"/>
+
<field name="state" widget="statusbar" readonly="1"/>
+
</header>
+
<sheet>
+
<div class="oe_title">
<h1>
<field name="name"/>
</h1>
</div>
+
<group>
+
<group>
<field name="pemohon"/>
<field name="departement_type"/>
<field name="tanggal"/>
<field name="upah_harian"/>
+
+ <field name="sisa_jam_mingguan" class="text-danger" attrs="{'invisible':[('sisa_jam_mingguan','=',0)]}"/>
</group>
+
+ <!-- ATTACHMENT -->
<group>
+
<field name="attachment_type" attrs="{'readonly': [('state', '=', 'approved')]}"/>
- <field name="attachment_file_pdf" filename="attachment_filename"
- widget="pdf_viewer"
- attrs="{'invisible': [('attachment_type', '!=', 'pdf')], 'readonly': [('state', '=', 'approved')]}"/>
+ <field name="attachment_file_pdf" filename="attachment_filename" widget="pdf_viewer" attrs="{'invisible': [('attachment_type', '!=', 'pdf')],
+ 'readonly': [('state', '=', 'approved')]}"/>
+
+ <field name="attachment_file_image" filename="attachment_filename" widget="image" attrs="{'invisible': [('attachment_type', '!=', 'image')],
+ 'readonly': [('state', '=', 'approved')]}" style="max-width:250px; max-height:250px; object-fit:contain;"/>
- <field name="attachment_file_image" filename="attachment_filename"
- widget="image"
- attrs="{'invisible': [('attachment_type', '!=', 'image')], 'readonly': [('state', '=', 'approved')]}"
- style="max-width:250px; max-height:250px; object-fit:contain;"/>
+ <field name="total_upah" readonly="1"/>
- <field name="total_upah"/>
</group>
+
</group>
+
+
+ <!-- ACTIVITY LINE -->
<notebook>
- <page string="Activity Line" name="activity_line">
+
+ <page string="Activity Line">
+
<field name="upah_harian_line">
- <tree editable="top">
- <field name="hari" width="100px"/>
+
+ <!-- LIST -->
+ <tree>
<field name="tanggal_line"/>
+ <field name="hari"/>
<field name="jam_masuk"/>
<field name="jam_keluar"/>
<field name="total_jam_kerja"/>
<field name="is_ganti_jam"/>
<field name="kegiatan"/>
</tree>
+
+ <!-- POPUP FORM -->
+ <form string="Activity">
+
+ <group col="2">
+
+ <field name="tanggal_line"/>
+ <field name="hari" readonly="1"/>
+
+ <field name="jam_masuk"/>
+ <field name="jam_keluar"/>
+
+ <field name="total_jam_kerja" readonly="1"/>
+
+ <field name="is_ganti_jam"/>
+
+ <field name="kegiatan" colspan="2" widget="text" placeholder="Tuliskan kegiatan hari ini..." style="min-height:120px;"/>
+
+ </group>
+
+ </form>
+
</field>
+
</page>
+
</notebook>
+
</sheet>
+
+
+ <!-- CHATTER -->
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
+
</field>
</record>
- <!-- View upah.harian.office search -->
+
<record id="view_upah_harian_search" model="ir.ui.view">
<field name="name">view.upah.harian.search</field>
<field name="model">upah.harian</field>
<field name="arch" type="xml">
<search>
+
+ <field name="name"/>
+ <field name="pemohon"/>
+
<group expand="1" string="Group By">
- <filter string="Name" name="name" domain="[]" context="{'group_by':'name'}"/>
+ <filter string="Pemohon" name="group_pemohon" context="{'group_by':'pemohon'}"/>
</group>
+
</search>
</field>
</record>
+
<record id="action_upah_harian" model="ir.actions.act_window">
<field name="name">Upah Harian</field>
<field name="res_model">upah.harian</field>
<field name="view_mode">tree,form</field>
</record>
- <menuitem id="menu_upah_harian" name="Upah Harian" parent="account.menu_finance_entries" sequence="114" action="action_upah_harian" />
+ <menuitem id="menu_upah_harian" name="Upah Harian" parent="account.menu_finance_entries" sequence="114" action="action_upah_harian"/>
-</odoo>
+</odoo> \ No newline at end of file