summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
authorMqdd <ahmadmiqdad27@gmail.com>2026-03-04 18:44:37 +0700
committerMqdd <ahmadmiqdad27@gmail.com>2026-03-04 18:44:37 +0700
commit3df3f47dd4998d9abb21bfbae5b0f4e78d560c72 (patch)
treebe532cadc57f1cbe72ec0e353375fe86e1e904da /indoteknik_custom/models
parent5971d8f9e3543945148b7e06cf0e4ee1a0685603 (diff)
<MIqdad> initial Commit
Diffstat (limited to 'indoteknik_custom/models')
-rw-r--r--indoteknik_custom/models/upah_harian_office.py43
1 files changed, 43 insertions, 0 deletions
diff --git a/indoteknik_custom/models/upah_harian_office.py b/indoteknik_custom/models/upah_harian_office.py
new file mode 100644
index 00000000..cc81530a
--- /dev/null
+++ b/indoteknik_custom/models/upah_harian_office.py
@@ -0,0 +1,43 @@
+from odoo import models, fields, api
+
+class UpahHarianOffice(models.Model):
+ _name = 'upah.harian.office'
+ _description = 'Upah Harian Office'
+
+ name = fields.Char()
+ upah_harian = fields.Float('Upah Harian', required=True)
+ pemohon = fields.Many2one('res.users', String='Pemohon', required=True)
+ tanggal = fields.Date('Tanggal Pengajuan', required=True)
+ state = fields.Selection([('draft', 'Draft'), ('done', 'Done')], default='draft')
+ 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'),
+ ('pimpinan', 'Pimpinan')
+ ], string='Departement Type', tracking=3, required=True)
+
+ @api.models
+ def create(self, vals):
+ vals['name'] = self.env['ir.sequence'].next_by_code('upah.harian.office')
+ return super(UpahHarianOffice, self).create(vals)
+
+
+
+class UpahHarianOfficeLine(models.Model):
+ _name = 'upah.harian.line'
+ _description = 'Upah Harian Line'
+
+ name = fields.Char()
+ upah_harian_id = fields.Many2one('upah.harian.office')
+ tanggal_line = fields.Datetime('Tanggal', required=True)
+ kegiatan = fields.Char('Kegiatan', required=True)
+ jam = fields.Float('Jam', required=True)