Initial commit: Odoomates Odoo packages (12 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:49:21 +02:00
commit 3b38c49bf0
526 changed files with 34983 additions and 0 deletions

View file

@ -0,0 +1,163 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="action_confirm_appointments" model="ir.actions.server">
<field name="name">Confirm Appointment</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_hospital_appointment"/>
<field name="binding_model_id" ref="model_hospital_appointment"/>
<field name="state">code</field>
<field name="code">records.action_confirm()</field>
</record>
<record id="view_appointment_tree" model="ir.ui.view">
<field name="name">hospital.appointment.tree</field>
<field name="model">hospital.appointment</field>
<field name="arch" type="xml">
<tree multi_edit="1">
<header>
<button name="action_done" string="Mark As Done" class="btn-primary"
type="object"/>
</header>
<field name="name"/>
<field name="doctor_id"/>
<field name="patient_id"/>
<field name="age" optional="show"/>
<field name="gender" optional="show"/>
<field name="date_appointment" optional="show"/>
<field name="date_checkup" optional="hide"/>
<field name="note" optional="show"/>
<field name="state" optional="show"/>
</tree>
</field>
</record>
<record id="view_appointment_form" model="ir.ui.view">
<field name="name">hospital.appointment.form</field>
<field name="model">hospital.appointment</field>
<field name="arch" type="xml">
<form>
<header>
<button id="button_confirm" name="action_confirm" string="Confirm" class="btn-primary" states="draft"
confirm="Are you sure that you need to confirm ?"
type="object"/>
<button id="button_done" name="action_done" string="Mark As Done" class="btn-primary" states="confirm"
type="object"/>
<button id="button_draft" name="action_draft" string="Set To Draft" class="btn-primary"
states="cancel" type="object"/>
<button id="button_cancel" name="action_cancel" string="Cancel" states="draft,done,confirm"
confirm="Are you sure that you need to cancel ?"
type="object"/>
<button name="action_url" string="Open URL" class="btn-primary"
type="object"/>
<field name="state" widget="statusbar" statusbar_visible="draft,done,confirm"/>
</header>
<sheet>
<div class="oe_title">
<h1>
<field name="name" readonly="1"/>
</h1>
</div>
<group>
<group>
<field name="patient_id"/>
<field name="gender" readonly="1" force_save="1"/>
<field name="age"/>
</group>
<group>
<field name="doctor_id"/>
<field name="date_appointment"/>
<field name="date_checkup"/>
</group>
</group>
<notebook>
<page string="Doctor Prescription" name="doctor_prescription">
<group>
<field name="prescription"/>
</group>
</page>
<page string="Medicine" name="medicine">
<field name="prescription_line_ids">
<tree editable="bottom">
<field name="name"/>
<field name="qty"/>
</tree>
<form>
<group>
<group>
<field name="name"/>
</group>
<group>
<field name="qty"/>
</group>
</group>
</form>
</field>
</page>
<page string="Other Info" name="other_info">
<field name="note"/>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
<record id="view_appointment_search" model="ir.ui.view">
<field name="name">hospital.appointment.search</field>
<field name="model">hospital.appointment</field>
<field name="arch" type="xml">
<search string="Patients">
<field name="name"/>
<field name="patient_id"/>
<separator/>
<filter string="Draft" name="draft" domain="[('state', '=', 'draft')]"/>
<group expand="1" string="Group By">
<filter string="Patient" name="patient_id" context="{'group_by':'patient_id'}"/>
</group>
</search>
</field>
</record>
<record id="action_hospital_appointment" model="ir.actions.act_window">
<field name="name">Appointments</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hospital.appointment</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_draft': 1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create your first appointment !
</p>
</field>
</record>
<menuitem id="menu_appointment_root"
name="Appointments"
parent="menu_hospital_root"
sequence="20"/>
<menuitem id="menu_appointment"
name="Appointments"
parent="menu_appointment_root"
action="action_hospital_appointment"
sequence="10"/>
<menuitem id="menu_create_appointment"
name="Create Appointment"
parent="menu_appointment_root"
action="action_create_appointment"
sequence="20"/>
<menuitem id="menu_search_appointment"
name="Search Appointment"
parent="menu_appointment_root"
action="action_search_appointment"
sequence="30"/>
</odoo>

View file

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="action_open_appointments" model="ir.actions.act_window">
<field name="name">Appointments</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hospital.appointment</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('doctor_id','=', active_id)]</field>
<field name="context">{'default_doctor_id': active_id}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create your first appointment !
</p>
</field>
</record>
<record id="view_doctor_kanban" model="ir.ui.view">
<field name="name">hospital.doctor.kanban</field>
<field name="model">hospital.doctor</field>
<field name="arch" type="xml">
<kanban sample="1">
<field name="id"/>
<field name="doctor_name"/>
<field name="gender"/>
<field name="age"/>
<field name="note"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_global_click">
<div class="oe_kanban_details">
<ul>
<li>
Name: <field name="doctor_name"/>
</li>
<li>
Age: <field name="age"/>
</li>
<li>
Gender: <field name="gender"/>
</li>
</ul>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="view_doctor_tree" model="ir.ui.view">
<field name="name">hospital.doctor.tree</field>
<field name="model">hospital.doctor</field>
<field name="arch" type="xml">
<tree sample="1">
<field name="doctor_name"/>
<field name="gender"/>
<field name="age"/>
<field name="note"/>
</tree>
</field>
</record>
<record id="view_doctor_form" model="ir.ui.view">
<field name="name">hospital.doctor.form</field>
<field name="model">hospital.doctor</field>
<field name="arch" type="xml">
<form>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="%(om_hospital.action_open_appointments)d" type="action"
class="oe_stat_button" icon="fa-calendar">
<div class="o_stat_info">
<field name="appointment_count" class="o_stat_value"/>
<span class="o_stat_text">Appointments</span>
</div>
</button>
</div>
<field name="image" widget="image" class="oe_avatar"/>
<group>
<group>
<field name="doctor_name"/>
<field name="age"/>
</group>
<group>
<field name="gender"/>
<field name="note"/>
<field name="active" invisible="1"/>
</group>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
<record id="view_doctor_search" model="ir.ui.view">
<field name="name">hospital.doctor.search</field>
<field name="model">hospital.doctor</field>
<field name="arch" type="xml">
<search string="Doctors">
<field name="doctor_name"/>
<field name="note"/>
<separator/>
<filter string="Male" name="male" domain="[('gender', '=', 'male')]"/>
<filter string="Female" name="female" domain="[('gender', '=', 'female')]"/>
<filter string="Others" name="other" domain="[('gender', '=', 'other')]"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
<group expand="1" string="Group By">
<filter string="Gender" name="gender" context="{'group_by':'gender'}"/>
</group>
</search>
</field>
</record>
<record id="action_hospital_doctor" model="ir.actions.act_window">
<field name="name">Doctors</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hospital.doctor</field>
<field name="view_mode">kanban,tree,form</field>
<field name="context">{}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create your first doctor!
</p>
</field>
</record>
<menuitem id="menu_doctor_root"
name="Doctors"
parent="menu_hospital_root"
sequence="10"/>
<menuitem id="menu_doctor"
name="Doctors"
parent="menu_doctor_root"
action="action_hospital_doctor"
sequence="10"/>
</odoo>

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="action_hospital_kids" model="ir.actions.act_window">
<field name="name">Kids</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hospital.patient</field>
<field name="view_mode">tree,kanban,form</field>
<field name="context">{}</field>
<field name="domain">[('age', '&lt;=', 18)]</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create your first kids!
</p>
</field>
</record>
<menuitem id="menu_kids"
name="Kids"
parent="menu_patient_root"
action="action_hospital_kids"
sequence="20"/>
</odoo>

View file

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="action_male_patients" model="ir.actions.act_window">
<field name="name">Male Patients</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hospital.patient</field>
<field name="view_mode">tree,kanban,form</field>
<field name="context">{'hide_gender': 1}</field>
<field name="domain">[('gender', '=', 'male')]</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create your first male patient!
</p>
</field>
</record>
<menuitem id="menu_male_patients"
name="Male Patients"
parent="menu_patient_root"
action="action_male_patients"
sequence="30"/>
<record id="action_female_patients" model="ir.actions.act_window">
<field name="name">Female Patients</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hospital.patient</field>
<field name="view_mode">tree,kanban,form</field>
<field name="context">{'default_gender': 'female', 'default_note': 'New Patient', 'hide_gender': 1}</field>
<field name="domain">[('gender', '=', 'female')]</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create your female patient !
</p>
</field>
</record>
<menuitem id="menu_female_patients"
name="Female Patients"
parent="menu_patient_root"
action="action_female_patients"
sequence="40"/>
</odoo>

View file

@ -0,0 +1,185 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="action_create_appointments" model="ir.actions.server">
<field name="name">Create Appointment</field>
<field name="model_id" ref="om_hospital.model_hospital_patient"/>
<field name="binding_model_id" ref="om_hospital.model_hospital_patient"/>
<field name="binding_view_types">list,form</field>
<field name="state">code</field>
<field name="code">
if record:
action_values = env.ref('om_hospital.action_create_appointment').sudo().read()[0]
action_values.update({'context': env.context})
action = action_values
</field>
</record>
<record id="view_patient_kanban" model="ir.ui.view">
<field name="name">hospital.patient.kanban</field>
<field name="model">hospital.patient</field>
<field name="arch" type="xml">
<kanban default_order="id asc">
<field name="id"/>
<field name="name"/>
<field name="reference"/>
<field name="gender"/>
<field name="age"/>
<field name="note"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_global_click">
<div class="oe_kanban_details">
<ul>
<li>
ID: <field name="reference"/>
</li>
<li>
Name: <field name="name"/>
</li>
<li>
Age: <field name="age"/>
</li>
<li>
Gender: <field name="gender"/>
</li>
</ul>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="view_patient_tree" model="ir.ui.view">
<field name="name">hospital.patient.tree</field>
<field name="model">hospital.patient</field>
<field name="arch" type="xml">
<tree>
<field name="reference"/>
<field name="name"/>
<field name="responsible_id"/>
<field name="gender"/>
<field name="age"/>
<field name="note"/>
<field name="appointment_count"/>
<!-- <field name="state"/>-->
</tree>
</field>
</record>
<record id="view_patient_form" model="ir.ui.view">
<field name="name">hospital.patient.form</field>
<field name="model">hospital.patient</field>
<field name="arch" type="xml">
<form>
<header>
<!-- <button id="button_confirm" name="action_confirm" string="Confirm" class="btn-primary" states="draft"-->
<!-- confirm="Are you sure that you need to confirm ?"-->
<!-- type="object"/>-->
<!-- <button id="button_done" name="action_done" string="Mark As Done" class="btn-primary" states="confirm"-->
<!-- type="object"/>-->
<!-- <button id="button_draft" name="action_draft" string="Set To Draft" class="btn-primary"-->
<!-- states="cancel" type="object"/>-->
<!-- <button id="button_cancel" name="action_cancel" string="Cancel" states="draft,done,confirm"-->
<!-- confirm="Are you sure that you need to cancel ?"-->
<!-- type="object"/>-->
<!-- <button id="button_create_appointment" name="%(om_hospital.action_create_appointment)d"-->
<!-- string="Create Appointment" class="btn-primary"-->
<!-- type="action"/>-->
<!-- <field name="state" widget="statusbar" statusbar_visible="draft,done,confirm"/>-->
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="action_open_appointments" type="object" class="oe_stat_button" icon="fa-calendar">
<div class="o_stat_info">
<field name="appointment_count" class="o_stat_value"/>
<span class="o_stat_text">Appointments</span>
</div>
</button>
</div>
<field name="image" widget="image" class="oe_avatar"/>
<div class="oe_title">
<h1>
<field name="reference" readonly="1"/>
</h1>
</div>
<group>
<group>
<field name="name"/>
<field name="responsible_id"/>
<field name="age"/>
<field name="appointment_count"/>
</group>
<group>
<field name="gender" invisible="context.get('hide_gender')"/>
<field name="note"/>
</group>
</group>
<notebook>
<page string="Appointments" name="appointment">
<field name="appointment_ids" readonly="1">
</field>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
<record id="view_patient_search" model="ir.ui.view">
<field name="name">hospital.patient.search</field>
<field name="model">hospital.patient</field>
<field name="arch" type="xml">
<search string="Patients">
<field name="name"/>
<field name="note"/>
<separator/>
<filter string="Male" name="male" domain="[('gender', '=', 'male')]"/>
<filter string="Female" name="female" domain="[('gender', '=', 'female')]"/>
<filter string="Others" name="other" domain="[('gender', '=', 'other')]"/>
<group expand="1" string="Group By">
<filter string="Gender" name="gender" context="{'group_by':'gender'}"/>
<filter string="Patient Name" name="patient_name" context="{'group_by':'name'}"/>
<filter string="Responsible" name="responsible_id" context="{'group_by':'responsible_id'}"/>
</group>
</search>
</field>
</record>
<record id="action_hospital_patient" model="ir.actions.act_window">
<field name="name">Patients</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hospital.patient</field>
<field name="view_mode">tree,kanban,form</field>
<field name="context">{}</field>
<!-- <field name="context">{'search_default_responsible_id': 1}</field>-->
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create your first patient!
</p>
</field>
</record>
<menuitem id="menu_hospital_root"
name="Hospital"
sequence="10"/>
<menuitem id="menu_patient_root"
name="Patients"
parent="menu_hospital_root"
sequence="10"/>
<menuitem id="menu_patient"
name="Patients"
parent="menu_patient_root"
action="action_hospital_patient"
sequence="10"/>
</odoo>

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_order_form_inherit" model="ir.ui.view">
<field name="name">sale.order.inherited</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='payment_term_id']" position="after">
<field name="sale_description"/>
</xpath>
</field>
</record>
<record id="view_order_tree_inherit" model="ir.ui.view">
<field name="name">sale.order.inherited</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_quotation_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='partner_id']" position="after">
<field name="sale_description"/>
</xpath>
</field>
</record>
<menuitem id="menu_sale_appointment"
name="Appointments"
parent="sale.sale_order_menu"
sequence="2"
action="action_hospital_appointment"/>
</odoo>