-
Notifications
You must be signed in to change notification settings - Fork 80
[ADD] veterinary_clinic: Veterinary Clinic #624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dhrs-odoo
wants to merge
13
commits into
odoo:saas-18.1
Choose a base branch
from
odoo-dev:saas-18.1-veterinary-clinic-industry-dhrs
base: saas-18.1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
2411ce9
initial commit
dhrs-odoo 14bdaf8
second commit
dhrs-odoo 4942178
third commit
dhrs-odoo bc05088
fourth commit
dhrs-odoo d4af539
fifth commit
dhrs-odoo b69e276
sixth commit
dhrs-odoo 1d6647a
functional change
dhrs-odoo 4845baf
remooved section from website
dhrs-odoo 32d775c
review changes-2
dhrs-odoo d620614
testing changes
dhrs-odoo f8b33a4
appointment view inherit
dhrs-odoo 678bf62
changes in the views
dhrs-odoo e229499
code review changes
dhrs-odoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{ | ||
'name': 'Veterinary Clinic', | ||
'version': '1.0', | ||
'category': 'Health and Fitness', | ||
'author': 'Odoo S.A.', | ||
'depends': [ | ||
'crm_enterprise', | ||
'documents_sign', | ||
'industry_fsm_sale_report', | ||
'knowledge', | ||
'pos_online_payment', | ||
'sale_crm', | ||
'sale_planning', | ||
'web_studio', | ||
'website_appointment_crm', | ||
], | ||
'data': [ | ||
'data/res_config_settings.xml', | ||
'data/ir_model.xml', | ||
'data/ir_model_fields.xml', | ||
'data/ir_actions_act_window.xml', | ||
'data/base_automation.xml', | ||
'data/ir_actions_server.xml', | ||
'data/ir_ui_view.xml', | ||
'data/ir_ui_menu.xml', | ||
'data/ir_model_access.xml', | ||
'data/ir_default.xml', | ||
'data/ir_sequence.xml', | ||
'data/crm_stage.xml', | ||
'data/documents_document.xml', | ||
'data/knowledge_article.xml', | ||
'data/ir_attachment_post.xml', | ||
'data/project_task_type.xml', | ||
'data/project_project.xml', | ||
'data/product_category.xml', | ||
'data/product_template.xml', | ||
'data/product_attribute.xml', | ||
'data/product_attribute_value.xml', | ||
'data/product_template_attribute_line.xml', | ||
'data/product_template_attribute_value.xml', | ||
'data/product_product.xml', | ||
'data/sale_order_template.xml', | ||
'data/sale_order_template_line.xml', | ||
'data/sign_template.xml', | ||
'data/sign_item.xml', | ||
'data/x_species.xml', | ||
'data/x_illnesses.xml', | ||
'data/x_species_line.xml', | ||
'data/x_pets.xml', | ||
'data/x_vaccines.xml', | ||
'data/mail_message.xml', | ||
'data/knowledge_article_favorite.xml', | ||
'data/knowledge_tour.xml', | ||
'data/pos_payment_method.xml', | ||
'data/pos_config.xml', | ||
'data/appointment_type.xml', | ||
'data/appointment_question.xml', | ||
'data/appointment_answer.xml', | ||
'data/crm_tag.xml', | ||
'data/website_view.xml', | ||
'data/website_theme_apply.xml', | ||
], | ||
'demo': [ | ||
'demo/appointment_type.xml', | ||
'demo/appointment_question.xml', | ||
'demo/crm_team.xml', | ||
'demo/website.xml', | ||
'demo/website_view.xml', | ||
'demo/pos_session.xml', | ||
'demo/res_partner.xml', | ||
'demo/calendar_event.xml', | ||
'demo/crm_lead.xml', | ||
'demo/ir_attachment_post.xml', | ||
'demo/sale_order.xml', | ||
'demo/sale_order_line.xml', | ||
'demo/x_pets.xml', | ||
'demo/website_theme_apply.xml', | ||
'demo/stock_warehouse_orderpoint.xml', | ||
], | ||
'license': 'OPL-1', | ||
'assets': { | ||
'web.assets_backend': [ | ||
'veterinary_clinic/static/src/js/my_tour.js', | ||
] | ||
}, | ||
'cloc_exclude': [ | ||
'data/knowledge_article.xml', | ||
'data/website_view.xml', | ||
'static/src/js/my_tour.js', | ||
'demo/website_view.xml', | ||
], | ||
'images': ['images/main.png'], | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<odoo noupdate="1"> | ||
<record id="appointment_answer_1" model="appointment.answer"> | ||
<field name="name">Annual Checkup / General Consultation</field> | ||
<field name="question_id" ref="appointment_question_1"/> | ||
</record> | ||
<record id="appointment_answer_6" model="appointment.answer"> | ||
<field name="name">Cat</field> | ||
<field name="question_id" ref="appointment_question_2"/> | ||
</record> | ||
<record id="appointment_answer_2" model="appointment.answer"> | ||
<field name="name">Pet is sick</field> | ||
<field name="question_id" ref="appointment_question_1"/> | ||
</record> | ||
<record id="appointment_answer_7" model="appointment.answer"> | ||
<field name="name">Dog</field> | ||
<field name="question_id" ref="appointment_question_2"/> | ||
</record> | ||
<record id="appointment_answer_3" model="appointment.answer"> | ||
<field name="question_id" ref="appointment_question_1"/> | ||
<field name="name">Dental checkup</field> | ||
</record> | ||
<record id="appointment_answer_8" model="appointment.answer"> | ||
<field name="name">Other</field> | ||
<field name="question_id" ref="appointment_question_2"/> | ||
</record> | ||
<record id="appointment_answer_4" model="appointment.answer"> | ||
<field name="name">First visit</field> | ||
<field name="question_id" ref="appointment_question_1"/> | ||
</record> | ||
<record id="appointment_answer_5" model="appointment.answer"> | ||
<field name="name">Vaccination</field> | ||
<field name="question_id" ref="appointment_question_1"/> | ||
</record> | ||
</odoo> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<odoo noupdate="1"> | ||
<record id="appointment_question_1" model="appointment.question"> | ||
<field name="name">Purpose of the visit</field> | ||
<field name="appointment_type_id" ref="appointment_type_1"/> | ||
</record> | ||
<record id="appointment_question_2" model="appointment.question"> | ||
<field name="name">Animal species</field> | ||
<field name="appointment_type_id" ref="appointment_type_1"/> | ||
</record> | ||
<record id="appointment_question_5" model="appointment.question"> | ||
<field name="name">Questions or remarks</field> | ||
<field name="appointment_type_id" ref="appointment_type_1"/> | ||
</record> | ||
</odoo> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<odoo noupdate="1"> | ||
<record id="appointment_type_1" model="appointment.type"> | ||
<field name="name">Consultation - Checkup</field> | ||
<field name="appointment_tz" model="res.users" eval="obj().env.ref('base.user_admin').tz or 'Europe/Brussels'"/> | ||
<field name="image_1920" type="base64" file="veterinary_clinic/static/src/binary/appointment_type/1-image_1920"/> | ||
<field name="appointment_duration">0.5</field> | ||
<field name="location_id" ref="base.main_partner"/> | ||
<field name="assign_method">time_resource</field> | ||
<field name="category">recurring</field> | ||
<field name="avatars_display">hide</field> | ||
<field name="message_intro"><![CDATA[<p>Easily schedule an appointment with our experienced veterinary team to keep your pet happy and healthy. Whether it’s a routine check-up, vaccinations, or specialized care, we’re here to provide expert, compassionate service.</p> | ||
<p>✔ Convenient online booking</p> | ||
<p>✔ Flexible appointment times</p> | ||
<p>✔ Experienced & caring veterinarians</p> | ||
<p>Secure your spot today and give your pet the care they deserve!</p> | ||
<p><span class="overflow-hidden text-clip whitespace-nowrap text-sm"></span></p>]]></field> | ||
<field name="min_cancellation_hours">4.0</field> | ||
<field name="min_schedule_hours">24.0</field> | ||
<field name="max_schedule_days">30</field> | ||
<field name="slot_creation_interval">0.75</field> | ||
<field name="staff_user_ids" eval="[(6, 0, [ref('base.user_admin')])]"/> | ||
<field name="slot_ids" eval="[ | ||
(0, 0, {'weekday': '1', 'start_hour': 9.0, 'end_hour': 12.0}), | ||
(0, 0, {'weekday': '1', 'start_hour': 14.0, 'end_hour': 17.0}), | ||
(0, 0, {'weekday': '2', 'start_hour': 9.0, 'end_hour': 12.0}), | ||
(0, 0, {'weekday': '2', 'start_hour': 14.0, 'end_hour': 17.0}), | ||
(0, 0, {'weekday': '3', 'start_hour': 9.0, 'end_hour': 12.0}), | ||
(0, 0, {'weekday': '3', 'start_hour': 14.0, 'end_hour': 17.0}), | ||
(0, 0, {'weekday': '4', 'start_hour': 9.0, 'end_hour': 12.0}), | ||
(0, 0, {'weekday': '4', 'start_hour': 14.0, 'end_hour': 17.0}), | ||
(0, 0, {'weekday': '5', 'start_hour': 9.0, 'end_hour': 12.0}), | ||
(0, 0, {'weekday': '5', 'start_hour': 14.0, 'end_hour': 17.0}), | ||
]"/> | ||
</record> | ||
</odoo> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<odoo> | ||
<record id="appointment_sequence_automation_rule" model="base.automation"> | ||
<field name="name">Appointment Sequence</field> | ||
<field name="model_id" ref="x_pets_line_model_record"/> | ||
<field name="trigger">on_create_or_write</field> | ||
<field name="trigger_field_ids" eval="[(6, 0, [ref('created_by_field')])]"/> | ||
</record> | ||
<record id="base_automation_3" model="base.automation"> | ||
<field name="name">Pet Owner Automation</field> | ||
<field name="model_id" ref="calendar.model_calendar_event"/> | ||
<field name="trigger">on_change</field> | ||
<field name="on_change_field_ids" eval="[(6, 0, [ref('calendar.field_calendar_event__create_uid')])]"/> | ||
</record> | ||
</odoo> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<odoo noupdate="1"> | ||
<record id="crm.stage_lead1" model="crm.stage" forcecreate="1"> | ||
<field name="name">New request</field> | ||
</record> | ||
<record id="crm.stage_lead2" model="crm.stage" forcecreate="1"> | ||
<field name="name">Validated</field> | ||
</record> | ||
<record id="crm.stage_lead4" model="crm.stage" forcecreate="1"> | ||
<field name="name">Booked</field> | ||
<field name="is_won" eval="True"/> | ||
</record> | ||
</odoo> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<odoo noupdate="1"> | ||
<record id="crm_tag_1" model="crm.tag"> | ||
<field name="name">Surgery</field> | ||
</record> | ||
<record id="crm_tag_2" model="crm.tag"> | ||
<field name="name">First Visit</field> | ||
</record> | ||
<record id="crm_tag_3" model="crm.tag"> | ||
<field name="name">Dental checkup</field> | ||
</record> | ||
<record id="crm_tag_4" model="crm.tag"> | ||
<field name="name">Active treatment</field> | ||
</record> | ||
</odoo> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<odoo noupdate="1"> | ||
<record id="documents_document_12" model="documents.document"> | ||
<field name="name">Surgeries</field> | ||
<field name="type">folder</field> | ||
<field name="owner_id" ref="base.user_admin"/> | ||
<field name="folder_id" ref="documents_project.document_project_folder"/> | ||
</record> | ||
</odoo> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<odoo> | ||
<record id="pets_window_action" model="ir.actions.act_window"> | ||
<field name="name">Pets</field> | ||
<field name="res_model">x_pets</field> | ||
<field name="view_mode">list,form,kanban</field> | ||
</record> | ||
<record id="species_window_action" model="ir.actions.act_window"> | ||
<field name="name">Species</field> | ||
<field name="res_model">x_species</field> | ||
</record> | ||
<record id="vaccines_window_action" model="ir.actions.act_window"> | ||
<field name="name">Vaccines</field> | ||
<field name="res_model">x_vaccines</field> | ||
</record> | ||
<record id="vaccines_tags_window_action" model="ir.actions.act_window"> | ||
<field name="name">Vaccines Tags</field> | ||
<field name="res_model">x_vaccines_tag</field> | ||
</record> | ||
<record id="illness_window_action" model="ir.actions.act_window"> | ||
<field name="name">Illnesses</field> | ||
<field name="res_model">x_illnesses</field> | ||
</record> | ||
<record id="veterinary_visits_window_action" model="ir.actions.act_window"> | ||
<field name="name">Veterinary Visits</field> | ||
<field name="res_model">calendar.event</field> | ||
<field name="context">{'search_default_x_many2many_field_6r2_1ijqjdqkq': active_id,'default_x_many2many_field_6r2_1ijqjdqkq': [active_id]}</field> | ||
<field name="domain">[('x_new_pet_field', '=', active_id)]</field> | ||
</record> | ||
<record id="action_window_pets" model="ir.actions.act_window"> | ||
<field name="name">Pets</field> | ||
<field name="res_model">x_pets</field> | ||
<field name="view_mode">kanban,list,form</field> | ||
</record> | ||
<record id="sale_order_x_pet_id_window_action" model="ir.actions.act_window"> | ||
<field name="name">Sale Order</field> | ||
<field name="res_model">sale.order</field> | ||
<field name="context">{'search_default_x_pet_id': active_id,'default_x_pet_id': active_id}</field> | ||
<field name="domain">[('x_pet_id', '=', active_id)]</field> | ||
</record> | ||
<record id="sale_order_x_pet_window_action" model="ir.actions.act_window"> | ||
<field name="name">Sale Order</field> | ||
<field name="res_model">sale.order</field> | ||
<field name="context">{'search_default_x_pet': active_id,'default_x_pet': active_id}</field> | ||
<field name="domain">[('x_pet', '=', active_id)]</field> | ||
</record> | ||
<record id="consultations_pet_line_action_window" model="ir.actions.act_window"> | ||
<field name="name">Consultations</field> | ||
<field name="res_model">x_pets_line_model</field> | ||
</record> | ||
<record id="pets_default_owner_window_action" model="ir.actions.act_window"> | ||
<field name="name">Pets </field> | ||
<field name="res_model">x_pets</field> | ||
<field name="context">{'search_default_x_owner': active_id,'default_x_owner': active_id}</field> | ||
<field name="domain">[('x_owner', '=', active_id)]</field> | ||
</record> | ||
</odoo> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<odoo> | ||
<record id="ir_actions_server_795" model="ir.actions.server"> | ||
<field name="binding_model_id" ref="x_pets_line_model_record"/> | ||
<field name="code"><![CDATA[ | ||
sale_order = env['sale.order'].search([('x_pet', '=', record.id)], limit=1) | ||
|
||
if not sale_order: | ||
# Create a demo sale order if none exists | ||
sale_order = env['sale.order'].create({ | ||
'partner_id': record.x_pets_id.x_owner.id, | ||
'x_pet': record.id, | ||
}) | ||
|
||
ctx = dict(env.context, order_id=sale_order.id) | ||
action = record.env['sale.order.line'].with_context(ctx).action_add_from_catalog() | ||
]]></field> | ||
<field name="model_id" ref="x_pets_line_model_record"/> | ||
<field name="state">code</field> | ||
<field name="name">catalog</field> | ||
</record> | ||
<record id="ir_actions_server_790" model="ir.actions.server"> | ||
<field name="binding_model_id" ref="x_pets_model"/> | ||
<field name="code"><![CDATA[ | ||
action = { | ||
'view_mode': 'form', | ||
'res_model': 'x_pets', | ||
'res_id': record.id, | ||
'type': 'ir.actions.act_window', | ||
} | ||
]]></field> | ||
<field name="model_id" ref="x_pets_model"/> | ||
<field name="state">code</field> | ||
<field name="name">View Action</field> | ||
</record> | ||
<record id="action_server_appointment_sequence" model="ir.actions.server" > | ||
<field name="name">Appointment Sequence server action</field> | ||
<field name="model_id" ref="x_pets_line_model_record"/> | ||
<field name="state">code</field> | ||
<field name="base_automation_id" ref="appointment_sequence_automation_rule"/> | ||
<field name="code"><![CDATA[ | ||
for rec in records: | ||
rec['x_name'] = "APP/" + rec.env['ir.sequence'].next_by_code('appointment.sequence') | ||
]]></field> | ||
</record> | ||
<record id="action_server_pet_owner_automation" model="ir.actions.server" > | ||
<field name="name">Pet Owner Automation</field> | ||
<field name="model_id" ref="calendar.model_calendar_event"/> | ||
<field name="state">code</field> | ||
<field name="base_automation_id" ref="base_automation_3"/> | ||
<field name="code"><![CDATA[ | ||
record.write({'appointment_booker_id': env.user.partner_id.id}) | ||
]]></field> | ||
</record> | ||
</odoo> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if there are 2 SO ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There won’t be any scenario with multiple sale orders due to the defined flow, and I’ve already ensured this by adding
limit=1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if there is a second consultation for the same pet. Looks weird.
Also, I stumbled on this while trying to click on "return to the quotation"
https://83211568-saas-18-1-imported_with_demo.runbot212.odoo.com/odoo/documents/HzouzBQLSl6iUiuLFYZenwof
And I can't open the consultation again afterwards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have resolved the issue and it will work fine as expected