TNCSC_Odoo/addons/community_membership/views/membership_tier_views.xml
metatroncubeswdev 657792b268
Some checks failed
CI / Brand-leak check (push) Has been cancelled
CI / flake8 / pylint-odoo / manifest completeness (push) Has been cancelled
CI / Install all modules with --test-enable (push) Has been cancelled
Add member application fields and the six real TNCSC membership plans
community_membership:
- Tiers get a fixed-term period (term_years), minimum age, a
  proof-document flag, a family-member flag and a signup description.
- Members get first/last name (composing the contact name), month and
  year of birth with computed age, board approval state with
  approve/reject buttons, terms acceptance, a proof-of-eligibility upload
  and an inline family members list. Birth date and proof document are
  restricted to Membership Managers.
- Constraints: plausible birth year; a tier's minimum age is enforced
  when the birth year is known.
- Fix pre-existing tests that collided with deployment-seeded tier codes
  and member ID format.

tncsc_deployment:
- Five Yes/No eligibility questions from the tncsc.com registration form
  (manager-only), shown in an Eligibility section of the member form.
- Tiers now match tncsc.com/membership-registration: Annual/Family $30,
  Long-Term (10 yr) $250, Life $500, Senior Annual (65+) $15, Senior Life
  (60+) $250, Student Annual $10 (CAD).
- 19.0.1.1.0 post-migrate rewrites existing tiers (noupdate data) and
  archives the unused Individual tier.

scripts/migrate_wp_members.py maps WordPress levels to the new LONG and
SENLIFE tiers. .mcp.json (holds credentials) is now gitignored.

Verified on the local Docker stack: -u on tncsc_site ran the migration
cleanly, and a fresh install with --test-enable passed 32/32 tests for
community_membership and tncsc_deployment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 10:46:31 -04:00

71 lines
3.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_membership_tier_list" model="ir.ui.view">
<field name="name">community.membership.tier.list</field>
<field name="model">community.membership.tier</field>
<field name="arch" type="xml">
<list string="Membership Tiers">
<field name="sequence" widget="handle"/>
<field name="name"/>
<field name="code"/>
<field name="price" widget="monetary"/>
<field name="currency_id" column_invisible="1"/>
<field name="period"/>
<field name="term_years" invisible="period != 'fixed_term'"/>
<field name="min_age" optional="show"/>
<field name="active" column_invisible="1"/>
</list>
</field>
</record>
<record id="view_membership_tier_form" model="ir.ui.view">
<field name="name">community.membership.tier.form</field>
<field name="model">community.membership.tier</field>
<field name="arch" type="xml">
<form string="Membership Tier">
<sheet>
<div class="oe_title">
<label for="name"/>
<h1><field name="name" placeholder="e.g. Individual"/></h1>
</div>
<group>
<group>
<field name="code"/>
<field name="price" widget="monetary"/>
<field name="currency_id" groups="base.group_multi_currency"/>
<field name="period"/>
<field name="term_years" invisible="period != 'fixed_term'"
required="period == 'fixed_term'"/>
</group>
<group>
<field name="sequence"/>
<field name="active"/>
<field name="product_id" readonly="1"/>
</group>
</group>
<group string="Eligibility">
<group>
<field name="min_age"/>
<field name="requires_proof"/>
<field name="allows_family_members"/>
</group>
</group>
<group string="Description">
<field name="description" nolabel="1"
placeholder="Who this tier is for, shown to applicants on the signup page..."/>
</group>
<group string="Notes">
<field name="member_state_logic" nolabel="1" placeholder="Optional admin notes on state handling for this tier..."/>
</group>
</sheet>
</form>
</field>
</record>
<record id="action_membership_tier" model="ir.actions.act_window">
<field name="name">Membership Tiers</field>
<field name="res_model">community.membership.tier</field>
<field name="view_mode">list,form</field>
</record>
</odoo>