Explorar el Código

Initial Commit

Sabekti Anggara hace 3 años
commit
94d995c9bf

+ 1
- 0
klinik/__init__.py Ver fichero

@@ -0,0 +1 @@
1
+from . import models

+ 22
- 0
klinik/__manifest__.py Ver fichero

@@ -0,0 +1,22 @@
1
+# -*- coding: utf-8 -*-
2
+{
3
+    "name": """KLINIK""",
4
+    "summary": """MODUL KLINIK.""",
5
+    "category": "Custom",
6
+    "version": "14.0.1",
7
+    "auto_install": False,
8
+    "installable": True,
9
+    "application": True,
10
+    "author": "DEV-GSI",
11
+    "website": "http://globalserviceindonesia.co.id",
12
+    "license": "OPL-1",
13
+
14
+    "depends": [
15
+        'base'
16
+    ],
17
+    "data": [
18
+        'security/ir.model.access.csv',
19
+        'views/klinik_view.xml'
20
+    ],
21
+    "sequence": 1,
22
+}

BIN
klinik/__pycache__/__init__.cpython-37.pyc Ver fichero


+ 1
- 0
klinik/models/__init__.py Ver fichero

@@ -0,0 +1 @@
1
+from . import klinik

BIN
klinik/models/__pycache__/__init__.cpython-37.pyc Ver fichero


BIN
klinik/models/__pycache__/klinik.cpython-37.pyc Ver fichero


+ 19
- 0
klinik/models/klinik.py Ver fichero

@@ -0,0 +1,19 @@
1
+# -*- coding: utf-8 -*-
2
+from odoo import models, fields
3
+
4
+class KlinikPasien(models.Model):
5
+    _name = "klinik.pasien"
6
+
7
+    name = fields.Char(string='Nama Pasien')
8
+    jenis_kelamin = fields.Selection([
9
+        ('pria','Laki laki'),
10
+        ('wanita','Wanita'),
11
+    ])
12
+
13
+    
14
+class KlinikDokter(models.Model):
15
+    _name = "klinik.dokter"
16
+
17
+    name = fields.Char()
18
+
19
+        

+ 2
- 0
klinik/security/ir.model.access.csv Ver fichero

@@ -0,0 +1,2 @@
1
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
2
+access_pasien_user,access.pasien.user,model_klinik_pasien,,1,1,1,1

+ 49
- 0
klinik/views/klinik_view.xml Ver fichero

@@ -0,0 +1,49 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<odoo>
3
+	<data>
4
+		<record id="pasien_view_form" model="ir.ui.view">
5
+			<field name="name">pasien_view_form</field>
6
+			<field name="model">klinik.pasien</field>
7
+			<field name="arch" type="xml">
8
+				<form>
9
+					<sheet>
10
+						<group>
11
+							<group>
12
+								<field name="name"/>
13
+								<field name="jenis_kelamin"/>
14
+							</group>
15
+						</group>
16
+						
17
+					</sheet>
18
+				</form>
19
+			</field>
20
+		</record>
21
+
22
+		<record id="pasien_view_tree" model="ir.ui.view">
23
+			<field name="name">pasien_view_tree</field>
24
+			<field name="model">klinik.pasien</field>
25
+			<field name="arch" type="xml">
26
+				<tree>
27
+					<field name="name"/>
28
+					<field name="jenis_kelamin"/>
29
+				</tree>
30
+			</field>
31
+		</record>
32
+
33
+		<record model="ir.actions.act_window" id="klinik_pasien_action">
34
+            <field name="name">Pasien</field>
35
+            <field name="res_model">klinik.pasien</field>
36
+            <field name="view_mode">tree,form</field>
37
+        </record>
38
+
39
+
40
+		<menuitem
41
+            id="klinik_menu_root"
42
+            name="Klinik"/>
43
+
44
+        <menuitem
45
+            id="klinik_menu_pasien"
46
+            name="Pasien" parent="klinik_menu_root" 
47
+            action="klinik_pasien_action"/>
48
+	</data>
49
+</odoo>

Loading…
Cancelar
Guardar