<?xml version="1.0"?>
<tryton>
    <data>

<!-- Results Report -->

        <record model="ir.ui.menu-res.group"
            id="menu_results_report_group_diagnostician">
            <field name="menu" ref="lims.lims_results_report_menu"/>
            <field name="group" ref="group_diagnostician"/>
        </record>
        <record model="ir.ui.menu-res.group"
            id="menu_results_report_group_diagnostician_admin">
            <field name="menu" ref="lims.lims_results_report_menu"/>
            <field name="group" ref="group_diagnostician_admin"/>
        </record>

        <record model="ir.model.access" id="access_results_report_group_diagnostician">
            <field name="model" search="[('model', '=', 'lims.results_report')]"/>
            <field name="group" ref="group_diagnostician"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="True"/>
            <field name="perm_create" eval="True"/>
            <field name="perm_delete" eval="True"/>
        </record>
        <record model="ir.model.access" id="access_results_report_group_diagnostician_admin">
            <field name="model" search="[('model', '=', 'lims.results_report')]"/>
            <field name="group" ref="group_diagnostician_admin"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="True"/>
            <field name="perm_create" eval="True"/>
            <field name="perm_delete" eval="True"/>
        </record>

<!-- Results Report Version Detail -->

        <record model="ir.ui.view" id="results_report_version_detail_view_list">
            <field name="model">lims.results_report.version.detail</field>
            <field name="inherit" ref="lims.lims_results_report_version_detail_view_list"/>
            <field name="name">results_report_version_detail_list</field>
        </record>
        <record model="ir.ui.view" id="results_report_version_detail_view_form">
            <field name="model">lims.results_report.version.detail</field>
            <field name="inherit" ref="lims.lims_results_report_version_detail_view_form"/>
            <field name="name">results_report_version_detail_form</field>
        </record>

        <record model="ir.action.act_window.domain"
                id="act_lims_results_report_version_detail_domain_diagnosed">
            <field name="name">Diagnosed</field>
            <field name="sequence" eval="25"/>
            <field name="domain"
                eval="[('state', '=', 'diagnosed')]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="lims.act_lims_results_report_version_detail"/>
        </record>

        <record model="ir.ui.menu-res.group"
            id="menu_results_report_version_detail_group_diagnostician">
            <field name="menu" ref="lims.lims_results_report_version_detail_menu"/>
            <field name="group" ref="group_diagnostician"/>
        </record>
        <record model="ir.ui.menu-res.group"
            id="menu_results_report_version_detail_group_diagnostician_admin">
            <field name="menu" ref="lims.lims_results_report_version_detail_menu"/>
            <field name="group" ref="group_diagnostician_admin"/>
        </record>

        <record model="ir.model.button" id="results_report_version_detail_diagnose_button">
            <field name="name">diagnose</field>
            <field name="model" search="[('model', '=', 'lims.results_report.version.detail')]"/>
        </record>
        <record model="ir.model.button-res.group"
            id="results_report_version_detail_diagnose_button_group_lims_laboratory_reports">
            <field name="button" ref="results_report_version_detail_diagnose_button"/>
            <field name="group" ref="lims.group_lims_laboratory_reports"/>
        </record>

        <record model="ir.model.access" id="access_results_report_version_detail_group_diagnostician">
            <field name="model" search="[('model', '=', 'lims.results_report.version.detail')]"/>
            <field name="group" ref="group_diagnostician"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="True"/>
            <field name="perm_create" eval="True"/>
            <field name="perm_delete" eval="True"/>
        </record>
        <record model="ir.model.access" id="access_results_report_version_detail_group_diagnostician_admin">
            <field name="model" search="[('model', '=', 'lims.results_report.version.detail')]"/>
            <field name="group" ref="group_diagnostician_admin"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="True"/>
            <field name="perm_create" eval="True"/>
            <field name="perm_delete" eval="True"/>
        </record>

        <record model="ir.model.field.access" id="access_results_report_version_detail_diagnostician">
            <field name="field" search="[('name', '=', 'diagnostician'), ('model.model', '=', 'lims.results_report.version.detail')]"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.field.access" id="access_results_report_version_detail_diagnostician_group_diagnostician_admin">
            <field name="field" search="[('name', '=', 'diagnostician'), ('model.model', '=', 'lims.results_report.version.detail')]"/>
            <field name="group" ref="group_diagnostician_admin"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="True"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>

<!-- Results Report Version Detail Sample -->

        <record model="ir.ui.view" id="results_report_version_detail_sample_view_list">
            <field name="model">lims.results_report.version.detail.sample</field>
            <field name="inherit" ref="lims.lims_results_report_version_detail_sample_view_list"/>
            <field name="name">results_report_version_detail_sample_list</field>
        </record>
        <record model="ir.ui.view" id="results_report_version_detail_sample_view_form">
            <field name="model">lims.results_report.version.detail.sample</field>
            <field name="inherit" ref="lims.lims_results_report_version_detail_sample_view_form"/>
            <field name="name">results_report_version_detail_sample_form</field>
        </record>

<!-- Results Report Version Detail Line -->

        <record model="ir.ui.view" id="results_report_version_detail_line_view_list">
            <field name="model">lims.results_report.version.detail.line</field>
            <field name="inherit" ref="lims.lims_results_report_version_detail_line_view_list"/>
            <field name="name">results_report_version_detail_line_list</field>
        </record>

<!-- Wizard Open Samples Pending Reporting -->

        <record model="ir.ui.menu-res.group"
            id="menu_samples_pending_reporting_group_diagnostician">
            <field name="menu" ref="lims.lims_samples_pending_reporting_menu"/>
            <field name="group" ref="group_diagnostician"/>
        </record>
        <record model="ir.ui.menu-res.group"
            id="menu_samples_pending_reporting_group_diagnostician_admin">
            <field name="menu" ref="lims.lims_samples_pending_reporting_menu"/>
            <field name="group" ref="group_diagnostician_admin"/>
        </record>

<!-- Wizard Change Sample Diagnostician -->

        <record model="ir.ui.view" id="notebook_change_diagnostician_view_form">
            <field name="model">lims.notebook.change_diagnostician.start</field>
            <field name="type">form</field>
            <field name="name">notebook_change_diagnostician_form</field>
        </record>

        <record model="ir.action.wizard" id="wiz_notebook_change_diagnostician">
            <field name="name">Change Sample Diagnostician</field>
            <field name="wiz_name">lims.notebook.change_diagnostician</field>
        </record>

        <record model="ir.action.keyword" id="wiz_notebook_change_diagnostician_keyword">
            <field name="keyword">form_action</field>
            <field name="model">lims.notebook,-2</field>
            <field name="action" ref="wiz_notebook_change_diagnostician"/>
        </record>

        <record model="ir.action-res.group"
            id="wiz_notebook_change_diagnostician-group_diagnostician_admin">
            <field name="action" ref="wiz_notebook_change_diagnostician"/>
            <field name="group" ref="group_diagnostician_admin"/>
        </record>

<!-- Wizard Open Samples Comparator -->

        <record model="ir.ui.view" id="samples_comparator_ask_form">
            <field name="model">lims.samples_comparator.ask</field>
            <field name="type">form</field>
            <field name="name">samples_comparator_ask_form</field>
        </record>

        <record model="ir.action.wizard" id="wiz_open_samples_comparator">
            <field name="name">Samples Comparator</field>
            <field name="wiz_name">lims.samples_comparator.open</field>
        </record>

        <record model="ir.action.keyword" id="wiz_open_samples_comparator_keyword">
            <field name="keyword">form_action</field>
            <field name="model">lims.results_report.version.detail.sample,-1</field>
            <field name="action" ref="wiz_open_samples_comparator"/>
        </record>

        <menuitem action="wiz_open_samples_comparator"
            id="lims_open_samples_comparator_menu"
            parent="lims.lims_results_report_version_detail_menu" sequence="10"/>

<!-- Samples Comparator -->

        <record model="ir.ui.view" id="samples_comparator_view_form">
            <field name="model">lims.samples_comparator</field>
            <field name="type">form</field>
            <field name="name">samples_comparator_form</field>
        </record>

        <record model="ir.action.act_window" id="act_samples_comparator">
            <field name="name">Samples Comparator</field>
            <field name="res_model">lims.samples_comparator</field>
        </record>
        <record model="ir.action.act_window.view" id="act_samples_comparator_view_form">
            <field name="sequence" eval="20"/>
            <field name="view" ref="samples_comparator_view_form"/>
            <field name="act_window" ref="act_samples_comparator"/>
        </record>

<!-- Samples Comparator Line -->

        <record model="ir.ui.view" id="samples_comparator_line_view_list">
            <field name="model">lims.samples_comparator.line</field>
            <field name="type">tree</field>
            <field name="name">samples_comparator_line_list</field>
        </record>
        <record model="ir.ui.view" id="samples_comparator_line_view_form">
            <field name="model">lims.samples_comparator.line</field>
            <field name="type">form</field>
            <field name="name">samples_comparator_line_form</field>
        </record>

<!-- Cron -->

        <record model="ir.cron" id="cron_samples_comparator_clean_records">
            <field name="interval_number" eval="1"/>
            <field name="interval_type">days</field>
            <field name="method">lims.samples_comparator|clean_buffer</field>
        </record>

    </data>
</tryton>
