Skip to content

Commit 068bad2

Browse files
[ADD] climbing_gym: add module for Climbing Gym
- This industry package includes all you need to run your Climbing Gym business from entrance to subscription as well as staff and events management. - Sell subscriptions product from the Subscription App and the Sales App. - Manage your employees' shifts with the Planning App. - Sell goods on the fly from the Point of Sale App. - Resupply when needed with Purchase App. - Record entrances through the Contact App based on subscription or prepaid cards. - Manage waiver with the Sign App. - Generate visibility through the Website App. - Promote your upcoming events with the Events App. - Waiver can be sent for signature from contact form. - Sessions can be used from contact form when available. (from loyalty card or membership) task-4868305 closes #809 Signed-off-by: Vallaeys Valentin (vava) <[email protected]>
1 parent 75bb7a8 commit 068bad2

File tree

72 files changed

+3334
-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.

72 files changed

+3334
-0
lines changed

.weblate.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@
8686
"filemask": "cleaning_services/i18n/*.po",
8787
"new_base": "cleaning_services/i18n/cleaning_services.pot"
8888
},
89+
{
90+
"name": "climbing_gym",
91+
"filemask": "climbing_gym/i18n/*.po",
92+
"new_base": "climbing_gym/i18n/climbing_gym.pot"
93+
},
8994
{
9095
"name": "clothing_boutique",
9196
"filemask": "clothing_boutique/i18n/*.po",

climbing_gym/__manifest__.py

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
'name': 'Climbing Gym',
3+
'version': '1.0',
4+
'category': 'Health and Fitness',
5+
'depends': [
6+
'base_industry_data',
7+
'event_sale',
8+
'knowledge',
9+
'partnership',
10+
'pos_event',
11+
'pos_loyalty',
12+
'pos_online_payment',
13+
'pos_sale_subscription',
14+
'project_sale_subscription',
15+
'sale_crm',
16+
'sale_loyalty',
17+
'sale_planning',
18+
'sale_project_stock',
19+
'sign',
20+
'web_studio',
21+
'website_crm',
22+
'website_event',
23+
],
24+
'data': [
25+
'data/resource_calendar.xml',
26+
'data/ir_attachment.xml',
27+
'data/ir_default.xml',
28+
'data/ir_model_fields.xml',
29+
'data/event_tag_category.xml',
30+
'data/event_tag.xml',
31+
'data/res_config_settings.xml',
32+
'data/product_category.xml',
33+
'data/pos_category.xml',
34+
'data/product_pricelist.xml',
35+
'data/res_partner_grade.xml',
36+
'data/sale_subscription_pricing.xml',
37+
'data/product_template.xml',
38+
'data/product_product.xml',
39+
'data/product_pricelist_item.xml',
40+
'data/knowledge_article.xml',
41+
'data/knowledge_article_favorite.xml',
42+
'data/loyalty_program.xml',
43+
'data/loyalty_reward.xml',
44+
'data/loyalty_rule.xml',
45+
'data/mail_message.xml',
46+
'data/planning_role.xml',
47+
'data/planning_slot_template.xml',
48+
'data/pos_config.xml',
49+
'data/sign_template.xml',
50+
'data/sign_item.xml',
51+
'data/ir_actions_server.xml',
52+
'data/ir_ui_view.xml',
53+
],
54+
'demo': [
55+
'demo/ir_attachment_post.xml',
56+
'demo/res_config_settings.xml',
57+
'demo/event_event.xml',
58+
'demo/event_event_ticket.xml',
59+
'demo/event_slot.xml',
60+
'demo/hr_employee.xml',
61+
'demo/planning_slot.xml',
62+
'demo/sale_order.xml',
63+
'demo/sale_order_line.xml',
64+
'demo/sale_order_confirm.xml',
65+
'demo/website_view.xml',
66+
'demo/website_theme_apply.xml',
67+
'demo/website.xml',
68+
],
69+
'license': 'OPL-1',
70+
'author': 'Odoo S.A.',
71+
"cloc_exclude": [
72+
"data/knowledge_article.xml",
73+
"demo/website_view.xml",
74+
],
75+
'images': ['images/main.png'],
76+
}

climbing_gym/data/event_tag.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo noupdate="1">
3+
<record id="event_tag_1" model="event.tag">
4+
<field name="name">Monthly</field>
5+
<field name="category_id" ref="event_tag_category_1"/>
6+
</record>
7+
<record id="event_tag_2" model="event.tag">
8+
<field name="name">Every 2 weeks</field>
9+
<field name="category_id" ref="event_tag_category_1"/>
10+
</record>
11+
<record id="event_tag_3" model="event.tag">
12+
<field name="name">Annual</field>
13+
<field name="category_id" ref="event_tag_category_1"/>
14+
</record>
15+
</odoo>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo noupdate="1">
3+
<record id="event_tag_category_1" model="event.tag.category">
4+
<field name="name">Recurrence</field>
5+
</record>
6+
</odoo>
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo>
3+
<record id="action_send_waiver" model="ir.actions.server">
4+
<field name="name">Send Waiver</field>
5+
<field name="model_id" ref="base.model_res_partner"/>
6+
<field name="binding_model_id" ref="base.model_res_partner"/>
7+
<field name="state">code</field>
8+
<field name="code"><![CDATA[
9+
template = env['sign.template'].search([('x_is_waiver', '=', True)], limit=1)
10+
if not template:
11+
raise UserError("No waiver template found.")
12+
13+
for customer in records:
14+
sign_request = env['sign.request'].create({
15+
'template_id': template.id,
16+
'reference': template.display_name,
17+
'request_item_ids': [Command.create({
18+
'partner_id': customer.id,
19+
'role_id': env.ref('sign.sign_item_role_customer').id,
20+
})],
21+
})
22+
sign_request.send_signature_accesses()
23+
]]></field>
24+
</record>
25+
26+
<record id="action_use_session" model="ir.actions.server">
27+
<field name="name">Use Session</field>
28+
<field name="model_id" ref="base.model_res_partner"/>
29+
<field name="binding_model_id" ref="base.model_res_partner"/>
30+
<field name="state">code</field>
31+
<field name="code"><![CDATA[
32+
product, discount = False, False
33+
34+
if record.grade_id and record.grade_id.default_pricelist_id == record.property_product_pricelist:
35+
product = env['product.pricelist.item'].search([('product_tmpl_id.x_is_base_entrance', '=', True), ('pricelist_id', '=', record.property_product_pricelist)], order='percent_price desc', limit=1).product_tmpl_id
36+
37+
loyalty_card = env['loyalty.card'].search([('partner_id', '=', record.id), ('points', '>', 0), ('program_id', '!=', False)], limit=1)
38+
if not product and loyalty_card:
39+
product = loyalty_card.program_id.reward_ids.filtered("discount_line_product_id.x_is_base_entrance")[:1].discount_line_product_id
40+
discount = bool(product)
41+
42+
if not product: raise UserError("No entrance available via membership or loyalty.")
43+
44+
order = env['sale.order'].create({
45+
'partner_id': record.id,
46+
'order_line': [Command.create({'product_id': product.id, 'product_uom_qty': 1})],
47+
})
48+
49+
if discount: order.action_open_reward_wizard()
50+
51+
action = {
52+
'type': 'ir.actions.act_window',
53+
'name': 'Use Session',
54+
'res_model': 'sale.order',
55+
'view_mode': 'form',
56+
'res_id': order.id,
57+
'target': 'new',
58+
}
59+
]]></field>
60+
</record>
61+
</odoo>
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 noupdate="1">
3+
<record id="ir_attachment_1217" model="ir.attachment">
4+
<field name="name">Waiver.pdf</field>
5+
<field name="datas" type="base64" file="climbing_gym/static/src/binary/ir_attachment/1217-Waiver.pdf"/>
6+
<field name="res_model">sign.document</field>
7+
<field name="public" eval="True"/>
8+
</record>
9+
</odoo>

climbing_gym/data/ir_default.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo noupdate="1">
3+
<record id="company_type_default_record" model="ir.default">
4+
<field name="field_id" ref="base.field_res_partner__company_type"/>
5+
<field name="json_value">"person"</field>
6+
</record>
7+
</odoo>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<odoo>
3+
<record id="x_is_waiver" model="ir.model.fields">
4+
<field name="ttype">boolean</field>
5+
<field name="copied" eval="True"/>
6+
<field name="field_description">Is Waiver</field>
7+
<field name="model_id" ref="sign.model_sign_template"/>
8+
<field name="name">x_is_waiver</field>
9+
</record>
10+
11+
<record id="x_is_base_entrance" model="ir.model.fields">
12+
<field name="ttype">boolean</field>
13+
<field name="copied" eval="True"/>
14+
<field name="field_description">Is Base Entrance</field>
15+
<field name="model_id" ref="product.model_product_template"/>
16+
<field name="name">x_is_base_entrance</field>
17+
</record>
18+
</odoo>

climbing_gym/data/ir_ui_view.xml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<odoo>
3+
<record id="view_res_partner_form_inherit" model="ir.ui.view">
4+
<field name="name">res.partner.form.inherit</field>
5+
<field name="model">res.partner</field>
6+
<field name="inherit_id" ref="base.view_partner_form"/>
7+
<field name="active" eval="True"/>
8+
<field name="arch" type="xml">
9+
<div name="warning_tax" position="before">
10+
<header>
11+
<button name="%(action_send_waiver)d"
12+
type="action"
13+
string="Send Waiver"
14+
class="oe_stat_button"
15+
icon="fa-envelope"
16+
invisible="not id or signature_count != 0 or is_company"
17+
/>
18+
<button name="%(action_use_session)d"
19+
type="action"
20+
string="Use Session"
21+
icon="fa-ticket"
22+
class="oe_stat_button"
23+
/>
24+
</header>
25+
</div>
26+
</field>
27+
</record>
28+
29+
<record id="sign_template_view_list" model="ir.ui.view">
30+
<field name="name">sign.template.list</field>
31+
<field name="model">sign.template</field>
32+
<field name="inherit_id" ref="sign.sign_template_view_tree"/>
33+
<field name="active" eval="True"/>
34+
<field name="arch" type="xml">
35+
<xpath expr="//list[1]" position="attributes">
36+
<attribute name="editable">bottom</attribute>
37+
<attribute name="open_form_view">true</attribute>
38+
</xpath>
39+
<xpath expr="//field[@name='name']" position="after">
40+
<field name="x_is_waiver" optional="show"/>
41+
</xpath>
42+
</field>
43+
</record>
44+
</odoo>

0 commit comments

Comments
 (0)