Skip to content

Latest commit

 

History

History

spp_base_common

Folders and files

README.rst

OpenSPP Base (Common)

Production/Stable License: LGPL-3 OpenSPP/OpenSPP2

Foundation module that aggregates OpenSPP core dependencies and provides phone number validation, menu icon customization, and base user role configuration. Acts as the primary dependency for implementation-specific base modules, ensuring consistent phone validation rules and UI theming across the platform.

Key Capabilities

  • Define configurable phone validation rules with digit count and prefix requirements
  • Automatically validate phone numbers on create/write against active validation rules
  • Customize menu icons for Registry, Apps, Settings, and standard Odoo modules
  • Configure global and local registrar user roles with implied permissions
  • Auto-populate partner phone field from structured phone number records

Key Models

Model Description
spp.phone.validation Configurable phone validation rule (prefix, digits)

Extensions:

  • spp.phone.number - Adds automatic validation on save
  • res.partner - Adds phone auto-population from phone_number_ids
  • ir.module.module - Adds menu icon update on module install

Configuration

After installing:

  1. Menu icons (Registry, Apps, Settings) update automatically during installation
  2. Global/local registrar roles are configured with implied permissions via data files
  3. Create phone validation rules programmatically or via technical views (no standalone menu)

UI Location

No standalone menu. Phone validation configuration is accessible through:

  • Technical views (debug mode) via Settings > Technical > Database Structure > Models
  • Registry main menu gets custom OpenSPP icon
  • Apps and Settings menus get custom OpenSPP icons

Security

Group Access
base.group_system Full CRUD on phone validation
spp_registry.group_registry_read Read-only on phone validation
spp_registry.group_registry_write Read/Write (no create/delete)
spp_registry.group_registry_create Read/Create (no write/delete)

Additional access rules grant registry groups appropriate permissions on res.partner, spp.phone.number, spp.registry.id, spp.registry.relationship, spp.id.type, and technical models.

Extension Points

  • Override _onchange_phone_validation() in spp.phone.number to customize validation logic
  • Extend ICON_MAP in ir.module.module to add menu icons for additional modules
  • Inherit global/local role definitions in data/global_roles.xml and data/local_roles.xml

Dependencies

base, spp_user_roles, spp_hide_menus_base, spp_base_setting, spp_registry, spp_security

Table of contents

19.0.2.0.3

  • fix(ui): the form view's New button respects Odoo's create guard again. The web.FormView extension that lets a module hide the button with hideFormCreateButton replaced the button's condition instead of extending it, dropping Odoo's canCreate. As a result every form opened with create disabled — {'create': False} in the action context, create="0" on the form arch, or a role without create access — still rendered a working New button that opened a blank editable record, or failed with an access error on save (visible on installs without spp_programs; with it, a workaround hid the rendered button after the fact). The condition is now canCreate and !hideFormCreateButton: the flag can only hide the button, never show it, and modules using it keep working unchanged. Forms shown in dialogs use a separate template and were never affected (#582).

19.0.2.0.2

  • test: add a regression test guarding the PDF backend selected by odoo.tools.pdf. The Docker image accidentally shipped legacy PyPDF2 3.x next to pypdf; Odoo prefers PyPDF2 when importable, and its removed 1.x API (numPages/getPage) crashes multi-record PDF printing with a DeprecationError (OP#1168). The fix is in docker/Dockerfile (--no-deps on the Odoo editable install); this test fails on any image that regresses.

19.0.2.0.1

  • fix(security): add groups="base.group_system" to the existing <menuitem id="base.menu_management" /> override in views/main_view.xml. Out of the box the Apps top-level menu has no group restriction and is visible to every logged-in user, violating the OP#951 audit's Apps: no rows. The override here is the single authoritative declaration for this menu's attributes in the OpenSPP install (sequence, custom OpenSPP icon, and now group_ids); doing the gating anywhere upstream (e.g. a post_init_hook in spp_security) is unreliable because this <menuitem> reload re-writes the record without a groups attribute and resets group_ids to empty.

19.0.2.0.0

  • Initial migration to OpenSPP2

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • OpenSPP.org

Maintainers

Current maintainers:

jeremi gonzalesedwin1123 emjay0921

This module is part of the OpenSPP/OpenSPP2 project on GitHub.

You are welcome to contribute.