You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

135 lines
6.5 KiB

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<!-- Creating lab request form view-->
<record id="lab_request_view_list" model="ir.ui.view">
<field name="name">lab.request.view.list</field>
<field name="model">lab.request</field>
<field name="arch" type="xml">
<list string="Lab Request">
<field name="name"/>
<field name="lab_requestor_id"/>
<field name="lab_request_id"/>
<field name="test_request_id"/>
<field name="state" widget="badge" decoration-primary="state == 'draft'"
decoration-info="state in ('sample_collection', 'test_in_progress')"
decoration-success="state == 'completed'"/>
</list>
</field>
</record>
<record id="lab_request_view_form" model="ir.ui.view">
<field name="name">lab.request.view.form</field>
<field name="model">lab.request</field>
<field name="arch" type="xml">
<form string="Lab Request">
<header>
<button name="action_set_to_sample_collection"
invisible="state not in 'draft'"
string="Sample Collection" type="object"
class="oe_highlight"/>
<button name="action_set_to_test_in_progress"
invisible="state not in 'sample_collection'"
string="Test In Progress" type="object"
class="oe_highlight"/>
<button name="action_set_to_test_completed"
invisible="state not in 'test_in_progress'"
string="Complete Test" type="object"
class="oe_highlight"/>
<button name="action_print_lab_test"
invisible="state not in ('completed','invoiced')"
string="Print Lab Test" type="object"
class="oe_highlight"/>
<button name="action_cancel_lab_test"
invisible="state not in 'draft'" string="Cancel"
type="object"/>
<field name="state" widget="statusbar"
statusbar_visible="draft,sample_collection,test_in_progress,completed"
statusbar_colors='{"Completed":"blue","Test In Progress":"red","Invoiced":"grey"}'/>
</header>
<sheet>
<div class="oe_left" style="width: 500px;">
<div class="oe_title" style="width: 390px;">
<label class="oe_edit_only" for="name"/>
<h1>
<field name="name" class="oe_inline"/>
</h1>
</div>
</div>
<group>
<group col="4" colspan="4">
<field name="lab_requestor_id"
readonly="state != 'draft'"/>
<field name="lab_request_id"/>
<field name="lab_requesting_date"/>
<field name="test_request_id"/>
<field name="app_id" invisible="1"/>
</group>
</group>
<notebook colspan="4">
<page string="Test lines">
<field name="request_line_ids">
<list string="Test lines" editable="bottom">
<field name="test_content_id"/>
<field name="unit_id"/>
<field name="interval"/>
<field name="result"/>
</list>
</field>
</page>
<page name="Note"
string="Note">
<field name="comment"/>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<record id="lab_request_view_search" model="ir.ui.view">
<field name="name">lab.request.view.search</field>
<field name="model">lab.request</field>
<field name="priority" eval="8"/>
<field name="arch" type="xml">
<search string="Lab Request">
<field name="lab_requestor_id"/>
<field name="lab_request_id"/>
<field name="app_id"/>
<newline/>
<group expand="0" string="Group By...">
<filter name="lab_requestor_id" string="Patient"
domain="[]" context="{'group_by':'lab_requestor_id'}"/>
<filter name="lab_request_id" string="Date"
domain="[]"
context="{'group_by':'lab_request_id'}"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="act_open_lab_request_view">
<field name="name">Lab Request</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">lab.request</field>
<field name="view_mode">list,form</field>
<field name="search_view_id" ref="lab_request_view_search"/>
<field name="domain">[]</field>
<field name="context">{}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create Lab request.
</p>
</field>
</record>
<record model="ir.sequence" id="seq_lab_request">
<field name="name">Lab Request</field>
<field name="code">lab.request</field>
<field name="prefix">LR</field>
<field name="padding">3</field>
<field name="company_id" eval="False"/>
</record>
<menuitem id="menu_lab_request" name="Lab Request" sequence="12"
parent="lab_patient_menu_root"
groups="group_lab_management_user,group_lab_management_technician"/>
<menuitem id="menu_lab_request_child" name="Lab Request" sequence="10"
parent="menu_lab_request" action="act_open_lab_request_view"
groups="group_lab_management_user,group_lab_management_technician"/>
</odoo>