Skip to content

Commit adddc94

Browse files
[ADD] climbing_gym: 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)
1 parent 6aa496e commit adddc94

File tree

73 files changed

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

73 files changed

+3480
-0
lines changed

.tx/config

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,15 @@ resource_name = cleaning_services
145145
replace_edited_strings = false
146146
keep_translations = false
147147

148+
[o:odoo:p:odoo-s18-3:r:climbing_gym]
149+
file_filter = climbing_gym/i18n/<lang>.po
150+
source_file = climbing_gym/i18n/climbing_gym.pot
151+
type = PO
152+
minimum_perc = 0
153+
resource_name = climbing_gym
154+
replace_edited_strings = false
155+
keep_translations = false
156+
148157
[o:odoo:p:odoo-s18-3:r:clothing_boutique]
149158
file_filter = clothing_boutique/i18n/<lang>.po
150159
source_file = clothing_boutique/i18n/clothing_boutique.pot

climbing_gym/__manifest__.py

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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/res_config_settings.xml',
30+
'data/product_category.xml',
31+
'data/pos_category.xml',
32+
'data/product_pricelist.xml',
33+
'data/res_partner_grade.xml',
34+
'data/sale_subscription_pricing.xml',
35+
'data/product_template.xml',
36+
'data/product_product.xml',
37+
'data/knowledge_article.xml',
38+
'data/knowledge_article_favorite.xml',
39+
'data/loyalty_program.xml',
40+
'data/loyalty_reward.xml',
41+
'data/loyalty_rule.xml',
42+
'data/mail_message.xml',
43+
'data/planning_role.xml',
44+
'data/planning_slot_template.xml',
45+
'data/pos_payment_method.xml',
46+
'data/pos_config.xml',
47+
'data/sign_template.xml',
48+
'data/sign_item.xml',
49+
'data/ir_actions_server.xml',
50+
'data/ir_ui_view.xml',
51+
],
52+
'demo': [
53+
'demo/event_tag_category.xml',
54+
'demo/event_tag.xml',
55+
'demo/event_event.xml',
56+
'demo/event_event_ticket.xml',
57+
'demo/event_slot.xml',
58+
'demo/product_pricelist_item.xml',
59+
'demo/hr_employee.xml',
60+
'demo/planning_slot.xml',
61+
'demo/sale_order.xml',
62+
'demo/sale_order_line.xml',
63+
'demo/sale_order_confirm.xml',
64+
'demo/website.xml',
65+
'demo/website_view.xml',
66+
'demo/website_theme_apply.xml',
67+
'demo/sign_request.xml',
68+
'demo/sign_request_item.xml',
69+
],
70+
'license': 'OPL-1',
71+
'author': 'Odoo S.A.',
72+
"cloc_exclude": [
73+
"data/knowledge_article.xml",
74+
"demo/website_view.xml",
75+
],
76+
'images': ['images/main.png'],
77+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
if not product:
38+
loyalty_card = env['loyalty.card'].search([('partner_id', '=', record.id)]).filtered(lambda card: card.points > 0)
39+
if loyalty_card and loyalty_card.program_id:
40+
for reward in loyalty_card.program_id.reward_ids.filtered("discount_line_product_id.x_is_base_entrance"):
41+
product = reward.discount_line_product_id
42+
discount = True
43+
44+
if not product: raise UserError("No entrance available via membership or loyalty.")
45+
46+
order = env['sale.order'].create({
47+
'partner_id': record.id,
48+
'order_line': [Command.create({'product_id': product.id, 'product_uom_qty': 1})],
49+
})
50+
51+
if discount: order.action_open_reward_wizard()
52+
53+
action = {
54+
'type': 'ir.actions.act_window',
55+
'name': 'Use Session',
56+
'res_model': 'sale.order',
57+
'view_mode': 'form',
58+
'res_id': order.id,
59+
'target': 'new',
60+
}
61+
]]></field>
62+
</record>
63+
</odoo>

climbing_gym/data/ir_attachment.xml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
<record id="ir_attachment_1029" model="ir.attachment">
10+
<field name="name">unsplash_FHNgTEuxyJA_bouldering.webp</field>
11+
<field name="datas" type="base64" file="climbing_gym/static/src/binary/ir_attachment/1029-unsplash_FHNgTEuxyJA_bouldering.webp"/>
12+
<field name="url">/unsplash/FHNgTEuxyJA/1029/bouldering.jpg</field>
13+
<field name="res_model">ir.ui.view</field>
14+
<field name="public" eval="True"/>
15+
</record>
16+
<record id="ir_attachment_1016" model="ir.attachment">
17+
<field name="name">unsplash_zu9l6Lqi4bE_rock climbing.jpg</field>
18+
<field name="datas" type="base64" file="climbing_gym/static/src/binary/ir_attachment/1016-unsplash_zu9l6Lqi4bE_rockclimbing.jpg"/>
19+
<field name="url">/unsplash/zu9l6Lqi4bE/rock climbing.jpg</field>
20+
<field name="res_model">ir.ui.view</field>
21+
<field name="public" eval="True"/>
22+
</record>
23+
<record id="ir_attachment_1013" model="ir.attachment">
24+
<field name="name">Event 'Annual Bouldering Showdown ' cover image.webp</field>
25+
<field name="datas" type="base64" file="climbing_gym/static/src/binary/ir_attachment/1013-Event'AnnualBoulderingShowdown 'coverimage.webp"/>
26+
<field name="res_model">ir.ui.view</field>
27+
<field name="public" eval="True"/>
28+
</record>
29+
<record id="ir_attachment_1011" model="ir.attachment">
30+
<field name="name">Event 'Climb Dating Sessions ' cover image.webp</field>
31+
<field name="datas" type="base64" file="climbing_gym/static/src/binary/ir_attachment/1011-Event'ClimbDatingSessions'coverimage.webp"/>
32+
<field name="res_model">ir.ui.view</field>
33+
<field name="public" eval="True"/>
34+
</record>
35+
<record id="configurator_1_s_wavy_grid_default_image_2" model="ir.attachment" forcecreate="1">
36+
<field name="name">website.s_wavy_grid_default_image_2</field>
37+
<field name="datas" type="base64" file="climbing_gym/static/src/binary/ir_attachment/974-website.s_wavy_grid_default_image_2"/>
38+
<field name="key">website.s_wavy_grid_default_image_2</field>
39+
<field name="website_id" ref="website.default_website"/>
40+
<field name="public" eval="True"/>
41+
</record>
42+
<record id="configurator_1_s_three_columns_default_image_3" model="ir.attachment" forcecreate="1">
43+
<field name="name">website.s_three_columns_default_image_3</field>
44+
<field name="datas" type="base64" file="climbing_gym/static/src/binary/ir_attachment/929-website.s_three_columns_default_image_3"/>
45+
<field name="key">website.s_three_columns_default_image_3</field>
46+
<field name="website_id" ref="website.default_website"/>
47+
<field name="public" eval="True"/>
48+
</record>
49+
<record id="configurator_1_s_three_columns_default_image_2" model="ir.attachment" forcecreate="1">
50+
<field name="name">website.s_three_columns_default_image_2</field>
51+
<field name="datas" type="base64" file="climbing_gym/static/src/binary/ir_attachment/928-website.s_three_columns_default_image_2"/>
52+
<field name="key">website.s_three_columns_default_image_2</field>
53+
<field name="website_id" ref="website.default_website"/>
54+
<field name="public" eval="True"/>
55+
</record>
56+
<record id="configurator_1_s_three_columns_default_image_1" model="ir.attachment" forcecreate="1">
57+
<field name="name">website.s_three_columns_default_image_1</field>
58+
<field name="datas" type="base64" file="climbing_gym/static/src/binary/ir_attachment/927-website.s_three_columns_default_image_1"/>
59+
<field name="key">website.s_three_columns_default_image_1</field>
60+
<field name="website_id" ref="website.default_website"/>
61+
<field name="public" eval="True"/>
62+
</record>
63+
</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>

climbing_gym/data/ir_model_fields.xml

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+
<xpath expr="//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+
</xpath>
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)