diff options
| -rwxr-xr-x | indoteknik_custom/__manifest__.py | 374 | ||||
| -rwxr-xr-x | indoteknik_custom/models/__init__.py | 1 | ||||
| -rwxr-xr-x | indoteknik_custom/models/res_users.py | 1 | ||||
| -rw-r--r-- | indoteknik_custom/models/upah_harian_office.py | 124 | ||||
| -rwxr-xr-x | indoteknik_custom/security/ir.model.access.csv | 2 | ||||
| -rw-r--r-- | indoteknik_custom/views/ir_sequence.xml | 9 | ||||
| -rw-r--r-- | indoteknik_custom/views/upah_harian_office_views.xml | 106 |
7 files changed, 431 insertions, 186 deletions
diff --git a/indoteknik_custom/__manifest__.py b/indoteknik_custom/__manifest__.py index 8c427579..77a49e96 100755 --- a/indoteknik_custom/__manifest__.py +++ b/indoteknik_custom/__manifest__.py @@ -9,192 +9,194 @@ 'website': '', 'images': ['assets/favicon.ico'], 'depends': ['base', 'coupon', 'delivery', 'sale', 'sale_management', 'vit_kelurahan', 'vit_efaktur', 'proweb_kartu_stok'], - 'data': [ - 'views/assets.xml', - 'security/ir.model.access.csv', - 'views/group_partner.xml', - 'views/blog_post.xml', - 'views/coupon_program.xml', - 'views/delivery_order.xml', - 'views/product_pricelist.xml', - 'views/res_groups.xml', - 'views/res_partner_company_type.xml', - 'views/res_partner.xml', - 'views/product_pricelist_item.xml', - 'views/product_public_category.xml', - 'views/product_template.xml', - 'views/uangmuka_pembelian.xml', - 'views/purchase_order.xml', - 'views/purchase_pricelist.xml', - 'views/sale_monitoring.xml', - 'views/sale_monitoring_detail.xml', - 'views/web_logging/user_activity_log.xml', - 'views/web_logging/web_utm_source.xml', - 'views/user_company_request.xml', - 'views/user_pengajuan_tempo_request.xml', - 'views/vit_kelurahan.xml', - 'views/vit_kecamatan.xml', - 'views/vit_kota.xml', - 'views/website_user_cart.xml', - 'views/website_user_wishlist.xml', - 'views/x_banner_banner.xml', - 'views/x_banner_category.xml', - 'views/x_biaya_kirim.xml', - 'views/x_manufactures.xml', - 'views/x_partner_purchase_order.xml', - 'views/x_product_tags.xml', - 'views/stock_vendor.xml', - 'views/crm_lead.xml', - 'views/uangmuka_penjualan.xml', - 'views/sale_order.xml', - 'views/account_asset_views.xml', - 'views/account_move_views.xml', - 'views/ir_sequence.xml', - 'views/stock_location.xml', - 'views/stock_picking.xml', - 'views/stock_picking_type.xml', - 'views/users.xml', - 'views/delivery_carrier.xml', - 'views/invoice_reklas.xml', - 'views/account_move.xml', - 'views/dunning_run.xml', - 'views/website_brand_homepage.xml', - 'views/website_categories_homepage.xml', - 'views/website_categories_management.xml', - 'views/website_telegram.xml', - 'views/website_categories_lob.xml', - 'views/sales_target.xml', - 'views/purchase_outstanding.xml', - 'views/sales_outstanding.xml', - 'views/customer_review.xml', - 'views/website_content_channel.xml', - 'views/website_content.xml', - 'views/website_page_content.xml', - 'views/custom_mail_marketing.xml', - 'views/website_ads.xml', - 'views/leads_monitoring.xml', - 'views/ip_lookup.xml', - 'views/wati.xml', - 'views/midtrans.xml', - 'views/automatic_purchase.xml', - 'views/raja_ongkir.xml', - 'views/procurement_monitoring_detail.xml', - 'views/product_product.xml', - 'views/brand_vendor.xml', - 'views/promotion/promotion_program.xml', - 'views/promotion/promotion_program_line.xml', - 'views/promotion/promotion_product.xml', - 'views/promotion/promotion_monitoring.xml', - 'views/requisition.xml', - 'views/landedcost.xml', - 'views/product_sla.xml', - 'views/voucher.xml', - 'views/bill_receipt.xml', - 'views/account_financial_report_view.xml', - 'views/account_report_general_ledger_view.xml', - 'views/account_move_multi_update.xml', - 'views/airway_bill.xml', - 'views/product_attribute_value.xml', - 'views/mail_template_po.xml', - 'views/mail_template_efaktur.xml', - 'views/mail_template_invoice_po.xml', - 'views/mail_template_invoice_reminder.xml', - 'views/price_group.xml', - 'views/mrp_production.xml', - 'views/apache_solr.xml', - 'views/apache_solr_queue.xml', - 'views/cost_centre.xml', - 'views/account_account_views.xml', - 'views/account_move_line.xml', - 'views/sale_orders_multi_update.xml', - 'views/quotation_so_multi_update.xml', - 'views/stock_move_line.xml', - 'views/product_monitoring.xml', - 'views/res_users.xml', - 'views/account_bank_statement.xml', - 'views/stock_warehouse_orderpoint.xml', - 'views/customer_commision.xml', - 'views/wati_history.xml', - 'views/purchasing_job.xml', - 'views/purchasing_job_multi_update.xml', - 'views/sale_monitoring_detail_v2.xml', - 'views/purchase_order_multi_update.xml', - 'views/purchase_order_multi_confirm.xml', - 'views/purchase_order_multi_ask_approval.xml', - 'views/invoice_reklas_penjualan.xml', - 'views/po_multi_cancel.xml', - 'views/logbook_sj.xml', - 'views/report_logbook_sj.xml', - 'views/role_permission/ir_model_access.xml', - 'views/role_permission/res_groups.xml', - 'views/cust_commision.xml', - 'views/stock_quant.xml', - 'views/purchasing_job_state.xml', - 'views/res_partner_site.xml', - 'views/apps_stored.xml', - 'views/ged_tracking.xml', - 'views/dunning_run_ged.xml', - 'views/account_move_multi_update_bills.xml', - 'views/def_cargo_province.xml', - 'views/def_cargo_city.xml', - 'views/def_cargo_district.xml', - 'views/purchase_order_multi_uangmuka.xml', - 'views/purchase_order_multi_uangmuka2.xml', - 'views/logbook_bill.xml', - 'views/report_logbook_bill.xml', - 'views/sale_order_multi_uangmuka_penjualan.xml', - 'views/shipment_group.xml', - 'views/approval_date_doc.xml', - 'views/approval_invoice_date.xml', - 'views/partner_payment_term.xml', - 'views/vendor_payment_term.xml', - 'views/approval_unreserve.xml', - 'views/vendor_approval.xml', - 'views/find_page.xml', - 'views/approval_retur_picking.xml', - 'views/form_vendor_approval_multi_approve.xml', - 'views/form_vendor_approval_multi_reject.xml', - 'views/user_pengajuan_tempo.xml', - 'views/stock_backorder_confirmation_views.xml', - 'views/barcoding_product.xml', - 'views/project_views.xml', - 'views/approval_payment_term.xml', - 'report/report.xml', - 'report/report_banner_banner.xml', - 'report/report_banner_banner2.xml', - 'report/purchase_order.xml', - 'report/report_invoice.xml', - 'report/report_picking.xml', - 'report/report_sale_order.xml', - 'report/report_surat_piutang.xml', - 'report/report_tutup_tempo.xml', - 'report/purchase_report.xml', - 'report/purchase_report_internal.xml', - 'views/vendor_sla.xml', - 'views/coretax_faktur.xml', - 'views/public_holiday.xml', - 'views/stock_inventory.xml', - 'views/sale_order_delay.xml', - 'views/refund_sale_order.xml', - 'views/advance_payment_request.xml', - 'views/advance_payment_settlement.xml', - 'views/tukar_guling.xml', - 'views/tukar_guling_po.xml', - 'views/update_date_planned_po_wizard_view.xml', - 'views/unpaid_invoice_view.xml', - 'views/letter_receivable.xml', - 'views/letter_receivable_mail_template.xml', - 'views/mail_template_pum.xml', - 'views/sj_tele.xml', - 'views/close_tempo_mail_template.xml', - 'views/domain_apo.xml', - 'views/uom_uom.xml', - 'views/update_depreciation_move_wizard_view.xml', - 'views/commission_internal.xml', - 'views/keywords.xml', - 'views/token_log.xml', - 'views/gudang_service.xml', - 'views/kartu_stock.xml', + "data": [ + "security/ir.model.access.csv", + "views/account_account_views.xml", + "views/account_asset_views.xml", + "views/account_bank_statement.xml", + "views/account_financial_report_view.xml", + "views/account_move_line.xml", + "views/account_move_multi_update_bills.xml", + "views/account_move_multi_update.xml", + "views/account_move_views.xml", + "views/account_move.xml", + "views/account_report_general_ledger_view.xml", + "views/advance_payment_request.xml", + "views/advance_payment_settlement.xml", + "views/airway_bill.xml", + "views/apache_solr_queue.xml", + "views/apache_solr.xml", + "views/approval_date_doc.xml", + "views/approval_invoice_date.xml", + "views/approval_payment_term.xml", + "views/approval_retur_picking.xml", + "views/approval_unreserve.xml", + "views/apps_stored.xml", + "views/assets.xml", + "views/automatic_purchase.xml", + "views/barcoding_product.xml", + "views/bill_receipt.xml", + "views/blog_post.xml", + "views/brand_vendor.xml", + "views/close_tempo_mail_template.xml", + "views/commission_internal.xml", + "views/coretax_faktur.xml", + "views/cost_centre.xml", + "views/coupon_program.xml", + "views/crm_lead.xml", + "views/cust_commision.xml", + "views/custom_mail_marketing.xml", + "views/customer_commision.xml", + "views/customer_review.xml", + "views/def_cargo_city.xml", + "views/def_cargo_district.xml", + "views/def_cargo_province.xml", + "views/delivery_carrier.xml", + "views/delivery_order.xml", + "views/domain_apo.xml", + "views/dunning_run_ged.xml", + "views/dunning_run.xml", + "views/find_page.xml", + "views/form_vendor_approval_multi_approve.xml", + "views/form_vendor_approval_multi_reject.xml", + "views/ged_tracking.xml", + "views/group_partner.xml", + "views/gudang_service.xml", + "views/invoice_reklas_penjualan.xml", + "views/invoice_reklas.xml", + "views/ip_lookup.xml", + "views/ir_sequence.xml", + "views/kartu_stock.xml", + "views/keywords.xml", + "views/landedcost.xml", + "views/leads_monitoring.xml", + "views/letter_receivable_mail_template.xml", + "views/letter_receivable.xml", + "views/logbook_bill.xml", + "views/logbook_sj.xml", + "views/mail_template_efaktur.xml", + "views/mail_template_invoice_po.xml", + "views/mail_template_invoice_reminder.xml", + "views/mail_template_po.xml", + "views/mail_template_pum.xml", + "views/midtrans.xml", + "views/mrp_production.xml", + "views/partner_payment_term.xml", + "views/po_multi_cancel.xml", + "views/price_group.xml", + "views/procurement_monitoring_detail.xml", + "views/product_attribute_value.xml", + "views/product_monitoring.xml", + "views/product_pricelist_item.xml", + "views/product_pricelist.xml", + "views/product_product.xml", + "views/product_public_category.xml", + "views/product_sla.xml", + "views/product_template.xml", + "views/project_views.xml", + "views/promotion/promotion_monitoring.xml", + "views/promotion/promotion_product.xml", + "views/promotion/promotion_program_line.xml", + "views/promotion/promotion_program.xml", + "views/public_holiday.xml", + "views/purchase_order_multi_ask_approval.xml", + "views/purchase_order_multi_confirm.xml", + "views/purchase_order_multi_uangmuka.xml", + "views/purchase_order_multi_uangmuka2.xml", + "views/purchase_order_multi_update.xml", + "views/purchase_order.xml", + "views/purchase_outstanding.xml", + "views/purchase_pricelist.xml", + "views/purchasing_job_multi_update.xml", + "views/purchasing_job_state.xml", + "views/purchasing_job.xml", + "views/quotation_so_multi_update.xml", + "views/raja_ongkir.xml", + "views/refund_sale_order.xml", + "views/report_logbook_bill.xml", + "views/report_logbook_sj.xml", + "views/requisition.xml", + "views/res_groups.xml", + "views/res_partner_company_type.xml", + "views/res_partner_site.xml", + "views/res_partner.xml", + "views/res_users.xml", + "views/role_permission/ir_model_access.xml", + "views/role_permission/res_groups.xml", + "views/sale_monitoring_detail_v2.xml", + "views/sale_monitoring_detail.xml", + "views/sale_monitoring.xml", + "views/sale_order_delay.xml", + "views/sale_order_multi_uangmuka_penjualan.xml", + "views/sale_order.xml", + "views/sale_orders_multi_update.xml", + "views/sales_outstanding.xml", + "views/sales_target.xml", + "views/shipment_group.xml", + "views/sj_tele.xml", + "views/stock_backorder_confirmation_views.xml", + "views/stock_inventory.xml", + "views/stock_location.xml", + "views/stock_move_line.xml", + "views/stock_picking_type.xml", + "views/stock_picking.xml", + "views/stock_quant.xml", + "views/stock_vendor.xml", + "views/stock_warehouse_orderpoint.xml", + "views/token_log.xml", + "views/tukar_guling_po.xml", + "views/tukar_guling.xml", + "views/uangmuka_pembelian.xml", + "views/uangmuka_penjualan.xml", + "views/unpaid_invoice_view.xml", + "views/uom_uom.xml", + "views/upah_harian_office_views.xml", + "views/update_date_planned_po_wizard_view.xml", + "views/update_depreciation_move_wizard_view.xml", + "views/user_company_request.xml", + "views/user_pengajuan_tempo_request.xml", + "views/user_pengajuan_tempo.xml", + "views/users.xml", + "views/vendor_approval.xml", + "views/vendor_payment_term.xml", + "views/vendor_sla.xml", + "views/vit_kecamatan.xml", + "views/vit_kelurahan.xml", + "views/vit_kota.xml", + "views/voucher.xml", + "views/wati_history.xml", + "views/wati.xml", + "views/web_logging/user_activity_log.xml", + "views/web_logging/web_utm_source.xml", + "views/website_ads.xml", + "views/website_brand_homepage.xml", + "views/website_categories_homepage.xml", + "views/website_categories_lob.xml", + "views/website_categories_management.xml", + "views/website_content_channel.xml", + "views/website_content.xml", + "views/website_page_content.xml", + "views/website_telegram.xml", + "views/website_user_cart.xml", + "views/website_user_wishlist.xml", + "views/x_banner_banner.xml", + "views/x_banner_category.xml", + "views/x_biaya_kirim.xml", + "views/x_manufactures.xml", + "views/x_partner_purchase_order.xml", + "views/x_product_tags.xml", + "views/upah_harian_office_views.xml", + "report/purchase_order.xml", + "report/purchase_report_internal.xml", + "report/purchase_report.xml", + "report/report_banner_banner.xml", + "report/report_banner_banner2.xml", + "report/report_invoice.xml", + "report/report_picking.xml", + "report/report_sale_order.xml", + "report/report_surat_piutang.xml", + "report/report_tutup_tempo.xml", + "report/report.xml" ], 'demo': [], 'css': [], diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index 31ee5108..b11b961f 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -170,3 +170,4 @@ from . import update_depreciation_move_wizard from . import keywords from . import token_log from . import kartu_stock +from . import upah_harian_office diff --git a/indoteknik_custom/models/res_users.py b/indoteknik_custom/models/res_users.py index b0864f2c..8f5b4008 100755 --- a/indoteknik_custom/models/res_users.py +++ b/indoteknik_custom/models/res_users.py @@ -12,6 +12,7 @@ class ResUsers(models.Model): otp_code = fields.Char(string='OTP Code') otp_create_date = fields.Datetime(string='OTP Create Date') payment_terms_id = fields.Many2one('account.payment.term', related='partner_id.property_payment_term_id', string='Payment Terms') + pic = fields.Boolean('PIC') def _generate_otp(self): diff --git a/indoteknik_custom/models/upah_harian_office.py b/indoteknik_custom/models/upah_harian_office.py new file mode 100644 index 00000000..d18ce64d --- /dev/null +++ b/indoteknik_custom/models/upah_harian_office.py @@ -0,0 +1,124 @@ +from odoo import models, fields, api +from odoo.exceptions import UserError, ValidationError + +class UpahHarianOffice(models.Model): + _name = 'upah.harian' + _description = 'Upah Harian' + _inherit = ['mail.thread', 'mail.activity.mixin'] + + name = fields.Char(readonly=True) + pemohon = fields.Many2one('res.users', String='Pemohon', required=True, domain = ([('active', '=', True), ('share', '=', False)])) + tanggal = fields.Date('Tanggal Pengajuan', required=True) + upah_harian = fields.Float('Upah Harian') + notes = fields.Text('Notes') + state = fields.Selection([('draft', 'Draft'), ('approved', 'Approved'), ('paid', 'Paid'), ('cancel', 'Canceled')], default='draft') + cancel_reason = fields.Text('Alasan Cancel') + attachment = fields.Binary('Attachment') + approved_by = fields.Char('Approved By') + attachment_type = fields.Selection([('pdf', 'PDF'), ('image', 'Image')]) + upah_harian_line = fields.One2many('upah.harian.line', 'upah_harian_id') + departement_type = fields.Selection([ + ('sales', 'Sales'), + ('merchandiser', 'Merchandiser'), + ('marketing', 'Marketing'), + ('logistic', 'Logistic'), + ('procurement', 'Procurement'), + ('fat', 'FAT'), + ('it', 'IT'), + ('hr_ga', 'HR & GA'), + ], string='Departement Type', tracking=3, required=True) + is_ganti_jam = fields.Boolean('Ganti Jam?', default="False") + total_upah = fields.Float('Total Upah Harian', compute='_compute_total_upah', readonly=True) + attachment_file_image = fields.Binary(string='Attachment Image', attachment_filename='attachment_filename_image') + attachment_file_pdf = fields.Binary(string='Attachment PDF', attachment_filename='attachment_filename_pdf') + attachment_filename_image = fields.Char(string='Filename Image') + attachment_filename_pdf = fields.Char(string='Filename PDF') + + + @api.onchange('attachment_type') + def _onchange_attachment_type(self): + self.attachment_file_image = False + self.attachment_filename_image = False + self.attachment_file_pdf = False + self.attachment_filename_pdf = False + + @api.model + def create(self, vals): + vals['name'] = self.env['ir.sequence'].next_by_code('upah.harian.office') + return super(UpahHarianOffice, self).create(vals) + + def action_approve(self): + if self.state == 'draft' and self.env.user.pic: + self.state = 'approved' + self.approved_by = self.env.user.name + + if not self.env.user.pic: + raise UserError("Only PIC user can approve this document.") + + self.state = 'done' + def action_reset_to_draft(self): + if self.state == 'cancel': + self.state = 'draft' + + def action_cancel(self): + if self.state == 'draft': + if self.cancel_reason == '' or self.cancel_reason == False: + raise UserError ('Harus Isi Alasan Cancel') + else: + self.state = 'cancel' + + @api.depends('upah_harian_line.upah_harian_compute') + def _compute_total_upah(self): + for rec in self: + rec.total_upah = sum(rec.upah_harian_line.mapped('upah_harian_compute')) + + def action_create_journal_entries(self): + return + + +class UpahHarianOfficeLine(models.Model): + _name = 'upah.harian.line' + _description = 'Upah Harian Line' + _order = 'id asc' + + MAX_WORKING_HOUR = 7.5 + + upah_harian_id = fields.Many2one('upah.harian') + upah_harian_compute = fields.Float('Upah Harian Computed', required=True, compute='_compute_upah_harian') + hari = fields.Char('Hari') + jam_masuk = fields.Float('Jam Masuk', required=True) + jam_keluar = fields.Float('Jam Keluar', required=True) + tanggal_line = fields.Date('Tanggal', required=True) + kegiatan = fields.Char('Kegiatan', required=True) + total_jam_kerja = fields.Float('Total Jam Kerja', compute='_compute_total_jam_kerja') + is_ganti_jam = fields.Boolean('Ganti Jam Kerja', default = False) + + @api.depends('total_jam_kerja', 'upah_harian_id.upah_harian') + def _compute_upah_harian(self): + for line in self: + if line.upah_harian_id.upah_harian: + upah_full = line.upah_harian_id.upah_harian + rate_per_hour = upah_full / self.MAX_WORKING_HOUR + line.upah_harian_compute = rate_per_hour * line.total_jam_kerja + else: + line.upah_harian_compute = 0 + + @api.depends('jam_masuk', 'jam_keluar') + def _compute_total_jam_kerja(self): + for line in self: + if line.jam_keluar and line.jam_masuk: + total = line.jam_keluar - line.jam_masuk + # Maksimal 7.5 jam + if total > self.MAX_WORKING_HOUR: + total = self.MAX_WORKING_HOUR + if total < 0: + total = 0 + line.total_jam_kerja = total + else: + line.total_jam_kerja = 0 + + @api.constrains('jam_masuk', 'jam_keluar') + def _check_jam_valid(self): + for line in self: + if line.jam_keluar <= line.jam_masuk: + raise ValidationError("Jam keluar harus lebih besar dari jam masuk.")
\ No newline at end of file diff --git a/indoteknik_custom/security/ir.model.access.csv b/indoteknik_custom/security/ir.model.access.csv index 041634fc..362e0951 100755 --- a/indoteknik_custom/security/ir.model.access.csv +++ b/indoteknik_custom/security/ir.model.access.csv @@ -223,4 +223,6 @@ access_update_depreciation_move_wizard,access.update.depreciation.move.wizard,mo access_keywords,keywords,model_keywords,base.group_user,1,1,1,1 access_token_log,access.token.log,model_token_log,,1,1,1,1 +access_upah_harian_office,upah.harian.office,model_upah_harian,base.group_user,1,1,1,1 +access_upah_harian_office_line,upah.harian.line,model_upah_harian_line,base.group_user,1,1,1,1 access_account_move_change_date_wizard,access.account.move.change.date.wizard,model_account_move_change_date_wizard,,1,1,1,1 diff --git a/indoteknik_custom/views/ir_sequence.xml b/indoteknik_custom/views/ir_sequence.xml index 55e48300..aa56e46a 100644 --- a/indoteknik_custom/views/ir_sequence.xml +++ b/indoteknik_custom/views/ir_sequence.xml @@ -269,5 +269,14 @@ <field name="number_next">1</field> <field name="number_increment">1</field> </record> + + <record id="seq_upah_harian_office" model="ir.sequence"> + <field name="name"></field> + <field name="code">upah.harian.office</field> + <field name="prefix">UPHO/%(year)s/%(month)s/</field> + <field name="padding">4</field> + <field name="number_next">1</field> + <field name="number_increment">1</field> + </record> </data> </odoo>
\ No newline at end of file diff --git a/indoteknik_custom/views/upah_harian_office_views.xml b/indoteknik_custom/views/upah_harian_office_views.xml new file mode 100644 index 00000000..f8260552 --- /dev/null +++ b/indoteknik_custom/views/upah_harian_office_views.xml @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + + <!-- View upah.harian.office View 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> + <field name="arch" type="xml"> + <tree> + <field name="name"/> + <field name="pemohon"/> + <field name="tanggal"/> + <field name="state"/> + </tree> + </field> + </record> + + <!-- View upah.harian.office 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'])]}"/> + <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"/> + </group> + + <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_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"/> + </group> + </group> + <notebook> + <page string="Activity Line" name="activity_line"> + <field name="upah_harian_line"> + <tree editable="top"> + <field name="hari" width="100px"/> + <field name="tanggal_line"/> + <field name="jam_masuk"/> + <field name="jam_keluar"/> + <field name="total_jam_kerja"/> + <field name="is_ganti_jam"/> + <field name="kegiatan"/> + </tree> + </field> + </page> + </notebook> + </sheet> + <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> + <group expand="1" string="Group By"> + <filter string="Name" name="name" domain="[]" context="{'group_by':'name'}"/> + </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" /> + + +</odoo> |
