How hirenst/partner-contact works
Project type and purpose
• This repository is a collection of Odoo “addons” (modules) under the “partner-contact” umbrella. Each module extends Odoo’s core partner/contact models, views, wizards, security rules, etc., to add new fields, constraints, cron jobs, UI improvements, or import routines.
• Purpose: Provide a suite of pluggable features for managing partner and contact data in an Odoo ERP instance (e.g., gender, birthdate, multi-relation, geonames import, deduplication, rank updates, labels, etc.).
File structure
• Top-level folders and files:
• .github, .pre-commit, lint, CI configs ⟶ development tooling
• README.md, LICENSE, requirements.txt
• A directory per addon-module (e.g. partner_address_split/, partner_external_map/, partner_multi_relation/, …).
• A setup/ folder replicating module packaging for pip/odoo-make.
• Inside each module:
• __manifest__.py ⟶ module metadata (name, version, dependencies, license).
• models/ ⟶ Python ORM classes extending models.res_partner, models.res_company, etc.
• views/ ⟶ XML definitions (form, tree, menu, wizards).
• data/ (optional) ⟶ demo or initial data.
• wizard/, security/, reports/, tests/, i18n/, static/description ⟶ typical Odoo substructures.
• Architectural pattern:
• MVC-like: Models (Python ORM) ↔ Views (XML + JS) → Controllers (Odoo HTTP routing)
• Plugin architecture: Odoo core loads all addons, merges their models/views/security into one running app.
README for additional insights
• Dependencies are implied by __manifest__.py; no external microservices except Geonames import (base_location_geonames_import).
Main components
a. Odoo Application Server
– Core framework: HTTP/JSON-RPC controllers, ORM, Scheduler (cron), QWeb reports
b. PostgreSQL Database
– Partner/contact tables extended by addon-models
c. Web Client (browser)
– XML/JS assets delivered by server
d. External services
– Geonames API (for base_location_geonames_import)
– Optional email validation service (partner_email_check)
– Maps services (Google Maps, OSM, Bing via partner_external_map)
Relationships and interactions
• Web Client ⇄ Odoo Server via HTTP / JSON-RPC
• Server ⇄ DB via ORM
• Modules hook via:
• Inheritance of core models (res_partner, res_company…)
• XML view extension/injection
• Cron jobs (e.g. partner_auto_archive, partner_contact_age_range)
• Wizards (pop-up workflows)
• Security rules (ir.model.access.csv, security.xml)
• Data import routines (base_location_geonames_import/data)
• Report templates (partner_label)
• External API calls initiated by specific modules (e.g. geonames, email validation, map URLs).
Architectural patterns and principles
• Plugin / modular architecture: each feature is its own module, loosely coupled to core via Odoo’s extension points.
• MVC:
• Models: Python files under models/
• Views: XML under views/ (plus static assets)
• Controllers: generic Odoo controllers, plus wizards under wizard/
• Cron / Scheduler: server-side periodic tasks
• Security layers: access control CSV, record rules in security/
• Internationalization: i18n/ folders for translations