Browse Source

[FIX] Bug Fixed 'medical_lab_management'

pull/124/head
Ajmalcybrosys 6 years ago
parent
commit
e0a52c0ff1
  1. 2
      medical_lab_management/__manifest__.py
  2. 7
      medical_lab_management/models/lab_appointment.py
  3. 2
      medical_lab_management/report/lab_patient_card.xml
  4. 40
      medical_lab_management/report/lab_test_report.xml

2
medical_lab_management/__manifest__.py

@ -21,7 +21,7 @@
{ {
'name': "Medical Lab Management", 'name': "Medical Lab Management",
'version': '12.0.1.0.0', 'version': '12.0.1.0.1',
'summary': """Manage Medical Lab Operations.""", 'summary': """Manage Medical Lab Operations.""",
'description': """Manage Medical Lab General Operations.""", 'description': """Manage Medical Lab General Operations.""",
'author': "Cybrosys Techno Solutions", 'author': "Cybrosys Techno Solutions",

7
medical_lab_management/models/lab_appointment.py

@ -78,11 +78,12 @@ class Appointment(models.Model):
'account_id': lab.patient_id.patient.property_account_receivable_id.id, 'account_id': lab.patient_id.patient.property_account_receivable_id.id,
'state': 'draft', 'state': 'draft',
'type': 'out_invoice', 'type': 'out_invoice',
'date_invoice': datetime.datetime.now(), 'date_invoice': str(datetime.datetime.now()),
'origin': "Lab Test# : " + lab.name, 'origin': "Lab Test# : " + lab.name,
'target': 'new', 'target': 'new',
'lab_request': lab.id, 'lab_request': lab.id,
'is_lab_invoice': True 'is_lab_invoice': True,
'picking_count': 0
} }
inv_ids = invoice_obj.create(curr_invoice) inv_ids = invoice_obj.create(curr_invoice)
@ -134,7 +135,7 @@ class Appointment(models.Model):
def confirm_appointment(self): def confirm_appointment(self):
message_body = "Dear " + self.patient_id.patient.name + "," + "<br>Your Appointment Has been Confirmed " \ message_body = "Dear " + self.patient_id.patient.name + "," + "<br>Your Appointment Has been Confirmed " \
+ "<br>Appointment ID : " + self.name + "<br>Date : " + self.appointment_date + \ + "<br>Appointment ID : " + self.name + "<br>Date : " + str(self.appointment_date) + \
'<br><br>Thank you' '<br><br>Thank you'
template_obj = self.env['mail.mail'] template_obj = self.env['mail.mail']

2
medical_lab_management/report/lab_patient_card.xml

@ -3,6 +3,7 @@
<data> <data>
<template id="report_patient_label"> <template id="report_patient_label">
<t t-call="web.html_container"> <t t-call="web.html_container">
<t t-call="web.external_layout">
<t t-foreach="docs" t-as="o"> <t t-foreach="docs" t-as="o">
<div class="page"> <div class="page">
<div class="oe_structure"/> <div class="oe_structure"/>
@ -55,6 +56,7 @@
<p style="page-break-after:always"></p> <p style="page-break-after:always"></p>
</t> </t>
</t> </t>
</t>
</template> </template>
</data> </data>
</odoo> </odoo>

40
medical_lab_management/report/lab_test_report.xml

@ -1,16 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<openerp> <odoo>
<data> <data>
<template id="report_patient_labtest"> <template id="report_patient_labtest">
<t t-foreach="docs" t-as="o"> <t t-call="web.html_container">
<t t-call="web.external_layout"> <t t-call="web.external_layout">
<t t-foreach="docs" t-as="o">
<div class="page"> <div class="page">
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"> </t>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"> </t>
</t>
<h3 style="text-decoration:underline;text-align:center;"><b>Lab Test Report</b></h3> <h3 style="text-decoration:underline;text-align:center;"><b>Lab Test Report</b></h3>
<br/> <br/>
<br/> <br/>
@ -22,8 +18,6 @@
</tr> </tr>
</table> </table>
<br/> <br/>
<br/>
<br/>
<br/> <br/>
<table width="99%" style="border:1px solid black;padding-left:1.16cm;"> <table width="99%" style="border:1px solid black;padding-left:1.16cm;">
<thead> <thead>
@ -32,16 +26,16 @@
<th style="border:1px solid black;text-align:center;" width="13%" class="td4">Normal Range</th> <th style="border:1px solid black;text-align:center;" width="13%" class="td4">Normal Range</th>
<th style="border:1px solid black;text-align:center;" width="13%" class="td4">Result</th> <th style="border:1px solid black;text-align:center;" width="13%" class="td4">Result</th>
</thead> </thead>
<tbody> <!--<tbody>-->
<t t-foreach="o.request_line" t-as="l"> <!--<t t-foreach="o.request_line" t-as="l">-->
<tr style="border:1px solid black"> <!--<tr style="border:1px solid black">-->
<td style="border:1px solid black;text-align:center;"><span t-esc="l.test_content.content_type_name" style="font-size:16px;"/></td> <!--<td style="border:1px solid black;text-align:center;"><span t-esc="l.test_content.content_type_name" style="font-size:16px;"/></td>-->
<td style="border:1px solid black;text-align:center;"><span t-esc="l.unit.code" style="font-size:16px;"/></td> <!--<td style="border:1px solid black;text-align:center;"><span t-esc="l.unit.code" style="font-size:16px;"/></td>-->
<td style="border:1px solid black;text-align:center;"><span t-esc="l.interval" style="font-size:16px;"/></td> <!--<td style="border:1px solid black;text-align:center;"><span t-esc="l.interval" style="font-size:16px;"/></td>-->
<td style="border:1px solid black;text-align:center;"><span t-esc="l.result" style="font-size:16px;"/></td> <!--<td style="border:1px solid black;text-align:center;"><span t-esc="l.result" style="font-size:16px;"/></td>-->
</tr> <!--</tr>-->
</t> <!--</t>-->
</tbody> <!--</tbody>-->
</table> </table>
<br/> <br/>
<br/> <br/>
@ -49,6 +43,8 @@
<p style="page-break-after:always"></p> <p style="page-break-after:always"></p>
</t> </t>
</t> </t>
</t>
</template> </template>
</data> </data>
</openerp>
</odoo>

Loading…
Cancel
Save