Browse Source

[UPDT] Extra Header Removed

pull/120/head
Ajmalcybrosys 6 years ago
parent
commit
d3a5921960
  1. 4
      medical_lab_management/models/lab_appointment.py
  2. 2
      medical_lab_management/models/lab_request.py
  3. 14
      medical_lab_management/views/lab_request.xml

4
medical_lab_management/models/lab_appointment.py

@ -19,14 +19,14 @@ class Appointment(models.Model):
_order = 'appointment_date'
user_id = fields.Many2one('res.users', 'Responsible', readonly=True)
patient_id = fields.Many2one('lab.patient', string='Patient', required=True, select=True,
patient_id = fields.Many2one('lab.patient', string='Patient', required=True,
help='Patient Name')
name = fields.Char(string='Appointment ID', readonly=True, default=lambda self: _('New'))
date = fields.Datetime(string='Requested Date', default=lambda s: fields.Datetime.now(),
help="This is the date in which patient appointment is noted")
appointment_date = fields.Datetime(string='Appointment Date', default=lambda s: fields.Datetime.now(),
help="This is the appointment date")
physician_id = fields.Many2one('res.partner', string='Referred By', select=True)
physician_id = fields.Many2one('res.partner', string='Referred By')
comment = fields.Text(string='Comments')
appointment_lines = fields.One2many('lab.appointment.lines', 'test_line_appointment', string="Test Request")

2
medical_lab_management/models/lab_request.py

@ -19,7 +19,7 @@ class LabRequest(models.Model):
name = fields.Char(string='Lab Test', size=16, readonly=True, required=True, help="Lab result ID", default=lambda *a: '#')
lab_request_id = fields.Char(string='Appointment ID', help="Lab appointment ID")
app_id = fields.Many2one('lab.appointment', string='Appointment')
lab_requestor = fields.Many2one('lab.patient', string='Patient', required=True, select=True,
lab_requestor = fields.Many2one('lab.patient', string='Patient', required=True,
help='Patient Name')
test_request = fields.Many2one('lab.test', string='Test')
lab_requesting_date = fields.Datetime(string='Requested Date')

14
medical_lab_management/views/lab_request.xml

@ -20,14 +20,12 @@
<field name="arch" type="xml">
<form string="Lab Request">
<header>
<header>
<button name="set_to_sample_collection" states="draft" string="Sample Collection" type="object"/>
<button name="set_to_test_in_progress" states="sample_collection" string="Test In Progress" type="object" class="oe_highlight"/>
<button name="set_to_test_completed" states="test_in_progress" string="Complete Test" type="object"/>
<button name="print_lab_test" states="completed,invoiced" string="Print Lab Test" type="object"/>
<button name="cancel_lab_test" states="draft" string="Cancel" type="object"/>
<field name="state" widget="statusbar" statusbar_visible="draft,sample_collection,test_in_progress,completed,cancel" statusbar_colors='{"Completed":"blue","Test In Progress":"red","Invoiced":"grey"}'/>
</header>
<button name="set_to_sample_collection" states="draft" string="Sample Collection" type="object"/>
<button name="set_to_test_in_progress" states="sample_collection" string="Test In Progress" type="object" class="oe_highlight"/>
<button name="set_to_test_completed" states="test_in_progress" string="Complete Test" type="object"/>
<button name="print_lab_test" states="completed,invoiced" string="Print Lab Test" type="object"/>
<button name="cancel_lab_test" states="draft" string="Cancel" type="object"/>
<field name="state" widget="statusbar" statusbar_visible="draft,sample_collection,test_in_progress,completed,cancel" statusbar_colors='{"Completed":"blue","Test In Progress":"red","Invoiced":"grey"}'/>
</header>
<sheet>
<div class="oe_left" style="width: 500px;">

Loading…
Cancel
Save