├── README.md └── om_hospital ├── __init__.py ├── __manifest__.py ├── models ├── __init__.py └── patient.py ├── security └── ir.model.access.csv └── views └── patient.xml /README.md: -------------------------------------------------------------------------------- 1 | # odoo-14_development_tutorials 2 | Odoo 14 Development Tutorials 3 | -------------------------------------------------------------------------------- /om_hospital/__init__.py: -------------------------------------------------------------------------------- 1 | from . import models 2 | -------------------------------------------------------------------------------- /om_hospital/__manifest__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | { 3 | 'name': 'Hospital Management', 4 | 'version': '1.0', 5 | 'summary': 'Hospital Management Software', 6 | 'sequence': -100, 7 | 'description': """Hospital Management Software""", 8 | 'category': 'Productivity', 9 | 'website': 'https://www.odoomates.tech', 10 | 'license': 'LGPL-3', 11 | 'depends': [], 12 | 'data': [ 13 | 'security/ir.model.access.csv', 14 | 'views/patient.xml' 15 | ], 16 | 'demo': [], 17 | 'qweb': [], 18 | 'installable': True, 19 | 'application': True, 20 | 'auto_install': False, 21 | } 22 | -------------------------------------------------------------------------------- /om_hospital/models/__init__.py: -------------------------------------------------------------------------------- 1 | from . import patient 2 | -------------------------------------------------------------------------------- /om_hospital/models/patient.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from odoo import api, fields, models 3 | 4 | 5 | class HospitalPatient(models.Model): 6 | _name = "hospital.patient" 7 | _description = "Hospital Patient" 8 | 9 | name = fields.Char(string='Name', required=True) 10 | age = fields.Integer(string='Age') 11 | gender = fields.Selection([ 12 | ('male', 'Male'), 13 | ('female', 'Female'), 14 | ('other', 'other'), 15 | ], required=True, default='male') 16 | note = fields.Text(string='Description') 17 | 18 | -------------------------------------------------------------------------------- /om_hospital/security/ir.model.access.csv: -------------------------------------------------------------------------------- 1 | id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink 2 | access_hospital_patient,access.hospital.patient,model_hospital_patient,,1,1,1,1 3 | -------------------------------------------------------------------------------- /om_hospital/views/patient.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | hospital.patient.tree 6 | hospital.patient 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | hospital.patient.form 19 | hospital.patient 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |
35 |
36 |
37 | 38 | 39 | Patients 40 | ir.actions.act_window 41 | hospital.patient 42 | tree,kanban,form 43 | 44 |

45 | create your first patient! 46 |

47 |
48 |
49 | 50 | 53 | 54 | 58 | 59 | 64 | 65 |
--------------------------------------------------------------------------------