Skip to content

Commit 66754b2

Browse files
dhrs-odoovava-odoo
authored andcommitted
[ADD] fitness: Fitness Center / Gym
This industry package includes everything you need to run your fitness center efficiently with Odoo. Basics Use the Sales & Subscriptions app to manage memberships, create custom fitness packages, and handle client sign-ups. Use the Appointments app to schedule personal training sessions, group classes, and equipment orientations. Employ the Point of Sale system for quick transactions, including membership payments, merchandise sales, and supplement purchases. Use the Inventory app to manage your fitness equipment, merchandise stock, and supplement supplies. Leverage the Planning app to organize staff schedules, class timetables, and facility maintenance. Use the Invoicing app to handle all financial transactions, from membership dues to equipment purchases. Included customizations A special pricelist for free courses is automatically applied to active subscription members, allowing them to book appointments at no cost. An automated action sets the booking fee to 0 when an active subscription member registers for a course, ensuring they aren't charged extra. Another automated action removes the free course pricelist when a member's subscription expires, reverting them to standard pricing. The attendees selection field is set to 1 by default and hidden on the Appointment form. Task-3765281
1 parent 03dd3b2 commit 66754b2

File tree

70 files changed

+1719
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1719
-0
lines changed

fitness/__manifest__.py

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
'name': 'Fitness Center',
3+
'version': '1.0',
4+
'category': 'Health and Fitness',
5+
'description': "",
6+
'depends': [
7+
'calendar',
8+
'contacts',
9+
'hr',
10+
'knowledge',
11+
'maintenance',
12+
'planning',
13+
'pos_sale',
14+
'purchase',
15+
'sale_project',
16+
'sale_subscription',
17+
'website_appointment',
18+
'website_sale',
19+
'web_studio',
20+
],
21+
'data': [
22+
'data/res_config_settings.xml',
23+
'data/ir_attachment_pre.xml',
24+
'data/product_category.xml',
25+
'data/pos_category.xml',
26+
'data/product_pricelist.xml',
27+
'data/sale_subscription.xml',
28+
'data/project_task_type.xml',
29+
'data/project_project.xml',
30+
'data/project_task.xml',
31+
'data/product_product.xml',
32+
'data/pos_payment_method.xml',
33+
'data/pos_config.xml',
34+
'data/knowledge_cover.xml',
35+
'data/knowledge_article.xml',
36+
'data/knowledge_article_favorite.xml',
37+
'data/mail_message.xml',
38+
'data/appointment_resource.xml',
39+
'data/appointment_type.xml',
40+
'data/maintenance_equipment.xml',
41+
'data/appointment_view.xml',
42+
'data/planning_role.xml',
43+
'data/ir_actions_server.xml',
44+
'data/base_automation.xml',
45+
'data/ir_model_data.xml',
46+
],
47+
'demo': [
48+
'demo/website.xml',
49+
'demo/res_partner.xml',
50+
'demo/hr_employee.xml',
51+
'demo/appointment_type.xml',
52+
'demo/calendar_event.xml',
53+
'demo/maintenance_request.xml',
54+
'demo/product_product.xml',
55+
'demo/product_supplierinfo.xml',
56+
'demo/purchase_order.xml',
57+
'demo/purchase_order_line.xml',
58+
'demo/purchase_order_post.xml',
59+
'demo/sale_order.xml',
60+
'demo/sale_order_line.xml',
61+
'demo/sale_order_post.xml',
62+
'demo/planning_recurrency.xml',
63+
'demo/planning_slot.xml',
64+
'demo/website_ir_attachment.xml',
65+
'demo/website_view.xml',
66+
'demo/website_theme_apply.xml',
67+
'demo/website_page.xml',
68+
'demo/website_menu.xml',
69+
'demo/pos_config.xml',
70+
'demo/payment_provider_demo_post.xml',
71+
],
72+
'license': 'OPL-1',
73+
'author': 'Odoo S.A.',
74+
'images': ['images/main.png'],
75+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo noupdate="1">
3+
<record id="appointment_resource_1" model="appointment.resource">
4+
<field name="name">Yoga Room</field>
5+
<field name="capacity">10</field>
6+
</record>
7+
<record id="appointment_resource_2" model="appointment.resource">
8+
<field name="name">Hit Room</field>
9+
<field name="capacity">15</field>
10+
</record>
11+
</odoo>

fitness/data/appointment_type.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo noupdate="1">
3+
<record id="appointment_type_1" model="appointment.type">
4+
<field name="name">Hit Course</field>
5+
<field name="location_id" ref="base.main_partner"/>
6+
<field name="appointment_tz" model="res.users" eval="obj().env.ref('base.user_admin').tz or 'Europe/Brussels'"/>
7+
<field name="category">recurring</field>
8+
<field name="resource_ids" eval="[(6, 0, [ref('appointment_resource_2')])]"/>
9+
<field name="can_publish" eval="True"/>
10+
<field name="schedule_based_on">resources</field>
11+
<field name="has_payment_step" eval="True"/>
12+
<field name="product_id" ref="default_booking_product"/>
13+
<field name="resource_manage_capacity" eval="True"/>
14+
<field name="user_assign_method">resource_time</field>
15+
<field name="slot_ids" eval="[(0, 0, {'weekday': '3', 'start_hour': 8.0, 'end_hour': 9.0})]"/>
16+
</record>
17+
<record id="appointment_type_2" model="appointment.type">
18+
<field name="name">Yoga Course</field>
19+
<field name="location_id" ref="base.main_partner"/>
20+
<field name="appointment_tz" model="res.users" eval="obj().env.ref('base.user_admin').tz or 'Europe/Brussels'"/>
21+
<field name="resource_ids" eval="[(6, 0, [ref('appointment_resource_1')])]"/>
22+
<field name="category">recurring</field>
23+
<field name="can_publish" eval="True"/>
24+
<field name="schedule_based_on">resources</field>
25+
<field name="has_payment_step" eval="True"/>
26+
<field name="product_id" ref="product_product_6"/>
27+
<field name="resource_manage_capacity" eval="True"/>
28+
<field name="user_assign_method">resource_time</field>
29+
<field name="slot_ids" eval="[(0, 0, {'weekday': '2', 'start_hour': 14.0, 'end_hour': 16.0})]"/>
30+
</record>
31+
</odoo>

fitness/data/appointment_view.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo>
3+
<template id="custom_appointment_info_view" inherit_id="appointment.appointment_info">
4+
<xpath expr="//div[@t-if=&quot;appointment_type.category in ['punctual', 'recurring']&quot;]" position="replace">
5+
<div t-if="slots and not based_on_users and appointment_type.resource_manage_capacity and max_capacity" class="mb-4">
6+
<input type="hidden" name="resourceCapacity" value="1"/>
7+
</div>
8+
<div t-if="not based_on_users and appointment_type.resource_manage_capacity" class="o_appointment_no_capacity d-flex mt-2 pb-0 text-center"/>
9+
</xpath>
10+
</template>
11+
</odoo>

fitness/data/base_automation.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo>
3+
<record id="cancelled_subscription_automation" model="base.automation">
4+
<field name="name">Update Customer &gt; Pricelist</field>
5+
<field name="action_server_ids" eval="[(6, 0, [ref('update_pricelist_server_action')])]"/>
6+
<field name="model_id" ref="sale.model_sale_order"/>
7+
<field name="trigger">on_create_or_write</field>
8+
<field name="trigger_field_ids" eval="[(6, 0, [ref('sale_subscription.field_sale_order__subscription_state')])]"/>
9+
<field name="filter_pre_domain">[("subscription_state", "=", "3_progress")]</field>
10+
</record>
11+
<record id="free_courses_for_sub_automation" model="base.automation">
12+
<field name="name">Update Customer &gt; Pricelist</field>
13+
<field name="action_server_ids" eval="[(6, 0, [ref('update_customer_price_server_action')])]"/>
14+
<field name="model_id" ref="sale.model_sale_order"/>
15+
<field name="trigger">on_create_or_write</field>
16+
<field name="trigger_field_ids" eval="[(6, 0, [ref('sale_subscription.field_sale_order__subscription_state')])]"/>
17+
<field name="filter_domain">[]</field>
18+
<field name="filter_pre_domain">[("subscription_state", "!=", "3_progress"), ("subscription_state", "!=", False)]</field>
19+
</record>
20+
</odoo>

fitness/data/ir_actions_server.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo>
3+
<record id="update_customer_price_server_action" model="ir.actions.server">
4+
<field name="name">Free courses for subs - Server Actions</field>
5+
<field name="model_id" ref="sale.model_sale_order"/>
6+
<field name="state">object_write</field>
7+
<field name="evaluation_type">value</field>
8+
<field name="crud_model_id" ref="base.model_res_partner"/>
9+
<field name="update_field_id" ref="product.field_res_partner__property_product_pricelist"/>
10+
<field name="update_path">partner_id.property_product_pricelist</field>
11+
<field name="resource_ref" ref="product_pricelist_2"/>
12+
</record>
13+
<record id="update_pricelist_server_action" model="ir.actions.server">
14+
<field name="name">Update Pricelist for Partner</field>
15+
<field name="model_id" ref="sale.model_sale_order"/>
16+
<field name="state">object_write</field>
17+
<field name="evaluation_type">value</field>
18+
<field name="crud_model_id" ref="base.model_res_partner"/>
19+
<field name="update_field_id" ref="product.field_res_partner__property_product_pricelist"/>
20+
<field name="update_path">partner_id.property_product_pricelist</field>
21+
<field name="resource_ref" eval="False"/>
22+
</record>
23+
</odoo>

fitness/data/ir_attachment_pre.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo noupdate="1">
3+
<record id="ir_attachment_1009" model="ir.attachment">
4+
<field name="name">Fitness Industry.jpg</field>
5+
<field name="datas" type="base64" file="fitness/static/src/binary/ir_attachment/FitnessIndustry.jpg"/>
6+
<field name="url">/unsplash/kFCdfLbu6zA/Fitness Industry.jpg</field>
7+
</record>
8+
</odoo>

fitness/data/ir_model_data.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo>
3+
<record id="cloc_exclude_custom_appointment_info_view" model="ir.model.data">
4+
<field name="name">cloc_exclude_custom_appointment_info_view</field>
5+
<field name="model">ir.ui.view</field>
6+
<field name="module">__cloc_exclude__</field>
7+
<field name="res_id" eval="ref('custom_appointment_info_view')"/>
8+
</record>
9+
</odoo>

0 commit comments

Comments
 (0)