Skip to content

Commit

Permalink
[ADD] sports_coach: functional changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrs-odoo committed Oct 9, 2024
1 parent ad95387 commit a40c43e
Show file tree
Hide file tree
Showing 9 changed files with 186 additions and 107 deletions.
5 changes: 4 additions & 1 deletion sports_coach/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
'appointment_crm',
'appointment_hr',
'base_vat',
'calendar',
'knowledge',
'sale_crm',
'sale_timesheet',
'sale_project_forecast',
'sale_project',
],
'data': [
'data/ir_attachment_pre.xml',
Expand All @@ -32,10 +33,12 @@
'demo/account_analytic_account.xml',
'demo/crm_lead.xml',
'demo/hr_employee.xml',
'demo/calendar_event.xml',
'demo/project_project.xml',
'demo/sale_order.xml',
'demo/sale_order_line.xml',
'demo/project_task.xml',
'demo/account_analytic_line.xml',
'demo/sale_order_confirm.xml',
],
'license': 'OPL-1',
Expand Down
36 changes: 36 additions & 0 deletions sports_coach/data/appointment_type.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@
<field name="booked_mail_template_id" ref="appointment.attendee_invitation_mail_template"/>
<field name="canceled_mail_template_id" ref="appointment.appointment_canceled_mail_template"/>
<field name="reminder_ids" eval="[(6, 0, [ref('calendar.alarm_notif_1'), ref('calendar.alarm_mail_1'), ref('appointment_sms.calendar_alarm_data_1h_sms')])]"/>
<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>
<record id="appointment_type_2" model="appointment.type">
<field name="name">30-min Fitness Assessment</field>
Expand All @@ -22,6 +34,18 @@
<field name="product_id" ref="product_product_11"/>
<field name="canceled_mail_template_id" ref="appointment.appointment_canceled_mail_template"/>
<field name="reminder_ids" eval="[(6, 0, [ref('calendar.alarm_notif_1'), ref('calendar.alarm_mail_1'), ref('appointment_sms.calendar_alarm_data_1h_sms')])]"/>
<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>
<record id="appointment_type_3" model="appointment.type">
<field name="name">90-min Sport-Specific Coaching</field>
Expand All @@ -33,5 +57,17 @@
<field name="booked_mail_template_id" ref="appointment.attendee_invitation_mail_template"/>
<field name="canceled_mail_template_id" ref="appointment.appointment_canceled_mail_template"/>
<field name="reminder_ids" eval="[(6, 0, [ref('calendar.alarm_notif_1'), ref('calendar.alarm_mail_1'), ref('appointment_sms.calendar_alarm_data_1h_sms')])]"/>
<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>
18 changes: 18 additions & 0 deletions sports_coach/data/crm_stage.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1">
<record id="crm.stage_lead1" model="crm.stage">
<field name="name">Initial Contact</field>
<field name="sequence">1</field>
</record>
<record id="crm.stage_lead2" model="crm.stage">
<field name="sequence">2</field>
<field name="name">Assessment</field>
</record>
<record id="crm.stage_lead3" model="crm.stage">
<field name="name">Proposal</field>
<field name="sequence">3</field>
</record>
<record id="crm.stage_lead4" model="crm.stage">
<field name="name">Won</field>
<field name="sequence">5</field>
<field name="is_won" eval="True"/>
</record>
<record id="crm_stage_5" model="crm.stage">
<field name="name">Negotiation</field>
<field name="sequence">4</field>
</record>
</odoo>
3 changes: 0 additions & 3 deletions sports_coach/data/project_task_type.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
<field name="name">New</field>
<field name="user_id" eval="False"/>
</record>
<record id="project_task_type_10" model="project.task.type">
<field name="name">New</field>
</record>
<record id="project_task_type_12" model="project.task.type">
<field name="name">Done</field>
<field name="user_id" eval="False"/>
Expand Down
54 changes: 54 additions & 0 deletions sports_coach/demo/account_analytic_line.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="account_analytic_line_3" model="account.analytic.line">
<field name="project_id" ref="project_project_5"/>
<field name="employee_id" ref="hr.employee_admin"/>
<field name="date" eval="(DateTime.now()).strftime('%Y-%m-%d')"/>
<field name="so_line" ref="sale_order_line_1"/>
<field name="timesheet_invoice_type">billable_fixed</field>
<field name="account_id" ref="account_analytic_account_5"/>
<field name="partner_id" ref="res_partner_13"/>
<field name="product_uom_id" ref="uom.product_uom_hour"/>
<field name="department_id" ref="hr.dep_administration"/>
<field name="unit_amount">2.0</field>
<field name="order_id" ref="sale_order_1"/>
</record>
<record id="account_analytic_line_4" model="account.analytic.line">
<field name="project_id" ref="project_project_6"/>
<field name="employee_id" ref="hr.employee_admin"/>
<field name="date" eval="(DateTime.now()).strftime('%Y-%m-%d')"/>
<field name="so_line" ref="sale_order_line_4"/>
<field name="timesheet_invoice_type">billable_fixed</field>
<field name="account_id" ref="account_analytic_account_6"/>
<field name="partner_id" ref="res_partner_20"/>
<field name="product_uom_id" ref="uom.product_uom_hour"/>
<field name="department_id" ref="hr.dep_administration"/>
<field name="unit_amount">2.0</field>
<field name="order_id" ref="sale_order_3"/>
</record>
<record id="account_analytic_line_5" model="account.analytic.line">
<field name="project_id" ref="project_project_5"/>
<field name="employee_id" ref="hr.employee_admin"/>
<field name="so_line" ref="sale_order_line_1"/>
<field name="timesheet_invoice_type">billable_fixed</field>
<field name="account_id" ref="account_analytic_account_5"/>
<field name="partner_id" ref="res_partner_13"/>
<field name="product_uom_id" ref="uom.product_uom_hour"/>
<field name="department_id" ref="hr.dep_administration"/>
<field name="unit_amount">1.0</field>
<field name="order_id" ref="sale_order_1"/>
</record>
<record id="account_analytic_line_6" model="account.analytic.line">
<field name="project_id" ref="project_project_6"/>
<field name="date" eval="(DateTime.now()).strftime('%Y-%m-%d')"/>
<field name="employee_id" ref="hr.employee_admin"/>
<field name="so_line" ref="sale_order_line_4"/>
<field name="timesheet_invoice_type">billable_fixed</field>
<field name="account_id" ref="account_analytic_account_6"/>
<field name="partner_id" ref="res_partner_20"/>
<field name="product_uom_id" ref="uom.product_uom_hour"/>
<field name="department_id" ref="hr.dep_administration"/>
<field name="unit_amount">0.5</field>
<field name="order_id" ref="sale_order_3"/>
</record>
</odoo>
69 changes: 69 additions & 0 deletions sports_coach/demo/calendar_event.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1">
<record id="calendar_event_1" model="calendar.event">
<field name="name">John Smith - 60-min Personal Training Session Booking</field>
<field name="start_date" eval="DateTime.today().date()"/>
<field name="appointment_type_id" ref="appointment_type_1"/>
<field name="appointment_booker_id" ref="base.partner_admin"/>
<field name="videocall_location">https://sports-coach.odoo.com/calendar/join_videocall/a5ffa39f-ded7-4df8-a1b7-5aa536a13387</field>
<field name="alarm_ids" eval="[(6, 0, [ref('calendar.alarm_notif_1'), ref('calendar.alarm_mail_1'), ref('appointment_sms.calendar_alarm_data_1h_sms')])]"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_admin')])]"/>
<field name="start" model="appointment.type" eval="pytz.timezone(obj().env.ref('sports_coach.appointment_type_1').appointment_tz).localize(
DateTime.today().date() + relativedelta(days=1, hours=9)
).astimezone(pytz.UTC).replace(tzinfo=None)"/>
<field name="duration">1.0</field>
<field name="stop" model="appointment.type" eval="pytz.timezone(obj().env.ref('sports_coach.appointment_type_1').appointment_tz).localize(
DateTime.today().date() + relativedelta(days=1, hours=10)
).astimezone(pytz.UTC).replace(tzinfo=None)"/>
<field name="description"><![CDATA[
<ul>
<li>Phone: +000</li>
<li>Email: [email protected]</li>
</ul>
]]></field>
</record>
<record id="calendar_event_2" model="calendar.event">
<field name="name">Lena Martinez - 60-min Personal Training Session Booking</field>
<field name="appointment_type_id" ref="appointment_type_1"/>
<field name="appointment_booker_id" ref="base.partner_admin"/>
<field name="videocall_location">https://sports-coach.odoo.com/calendar/join_videocall/07ef501a-79b1-4a3b-9204-54ab23c89dc6</field>
<field name="alarm_ids" eval="[(6, 0, [ref('calendar.alarm_notif_1'), ref('calendar.alarm_mail_1'), ref('appointment_sms.calendar_alarm_data_1h_sms')])]"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_admin')])]"/>
<field name="start" model="appointment.type" eval="pytz.timezone(obj().env.ref('sports_coach.appointment_type_1').appointment_tz).localize(
DateTime.today().date() + relativedelta(days=2, hours=14)
).astimezone(pytz.UTC).replace(tzinfo=None)"/>
<field name="duration">1.0</field>
<field name="stop" model="appointment.type" eval="pytz.timezone(obj().env.ref('sports_coach.appointment_type_1').appointment_tz).localize(
DateTime.today().date() + relativedelta(days=2, hours=15)
).astimezone(pytz.UTC).replace(tzinfo=None)"/>
<field name="start_date" eval="DateTime.today().date()"/>
<field name="description"><![CDATA[
<ul>
<li>Phone: +00</li>
<li>Email: [email protected]</li>
</ul>
]]></field>
</record>
<record id="calendar_event_3" model="calendar.event">
<field name="name">Clayton Smouth - 90-min Sport-Specific Coaching Booking</field>
<field name="start_date" eval="DateTime.today().date()"/>
<field name="appointment_type_id" ref="appointment_type_3"/>
<field name="appointment_booker_id" ref="base.partner_admin"/>
<field name="videocall_location">https://sports-coach.odoo.com/calendar/join_videocall/f109633e-ca0a-47dc-91a3-b044528ec3b7</field>
<field name="alarm_ids" eval="[(6, 0, [ref('calendar.alarm_notif_1'), ref('calendar.alarm_mail_1'), ref('appointment_sms.calendar_alarm_data_1h_sms')])]"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_admin')])]"/>
<field name="start" model="appointment.type" eval="pytz.timezone(obj().env.ref('sports_coach.appointment_type_1').appointment_tz).localize(
DateTime.today().date() + relativedelta(days=3, hours=8)
).astimezone(pytz.UTC).replace(tzinfo=None)"/>
<field name="duration">1.5</field>
<field name="stop" model="appointment.type" eval="pytz.timezone(obj().env.ref('sports_coach.appointment_type_1').appointment_tz).localize(
DateTime.today().date() + relativedelta(days=3, hours=9)
).astimezone(pytz.UTC).replace(tzinfo=None)"/>
<field name="description"><![CDATA[
<ul>
<li>Phone: +00</li>
<li>Email: [email protected]</li>
</ul>
]]></field>
</record>
</odoo>
6 changes: 5 additions & 1 deletion sports_coach/demo/project_project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1">
<record id="project_project_1" model="project.project">
<field name="name">Internal</field>
<field name="analytic_account_id" ref="account_analytic_account_1"/>
</record>
<record id="project_project_2" model="project.project">
<field name="analytic_account_id" ref="account_analytic_account_2"/>
</record>
Expand All @@ -16,7 +20,7 @@
<field name="allow_billable" eval="True"/>
<field name="timesheet_product_id" ref="sale_timesheet.time_product"/>
<field name="allocated_hours">1.0</field>
<field name="type_ids" eval="[(6, 0, [ref('project_task_type_10'), ref('project_task_type_13')])]"/>
<field name="type_ids" eval="[(6, 0, [ref('project_task_type_9'), ref('project_task_type_13')])]"/>
<field name="partner_id" ref="res_partner_13"/>
</record>
<record id="project_project_6" model="project.project">
Expand Down
Loading

0 comments on commit a40c43e

Please sign in to comment.