Add module system for enabling/disabling feature bundles per platform. Module System: - ModuleDefinition dataclass for defining modules - 12 modules: core, platform-admin, billing, inventory, orders, marketplace, customers, cms, analytics, messaging, dev-tools, monitoring - Core modules (core, platform-admin) cannot be disabled - Module dependencies (e.g., marketplace requires inventory) MenuService Integration: - Menu items filtered by module enablement - MenuItemConfig includes is_module_enabled and module_code fields - Module-disabled items hidden from sidebar Platform Configuration: - BasePlatformConfig.enabled_modules property - OMS: all modules enabled (full commerce) - Loyalty: focused subset (no billing/inventory/orders/marketplace) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
88 lines
2.1 KiB
Python
88 lines
2.1 KiB
Python
# app/platforms/oms/config.py
|
|
"""
|
|
OMS Platform Configuration
|
|
|
|
Configuration for the Order Management System platform.
|
|
|
|
OMS is a full-featured order management system with:
|
|
- Inventory and product management
|
|
- Order processing and fulfillment
|
|
- Letzshop marketplace integration
|
|
- Customer management
|
|
- Billing and subscriptions
|
|
- Content management
|
|
- Analytics and reporting
|
|
"""
|
|
|
|
from app.platforms.shared.base_platform import BasePlatformConfig
|
|
|
|
|
|
class OMSPlatformConfig(BasePlatformConfig):
|
|
"""Configuration for the OMS platform."""
|
|
|
|
@property
|
|
def code(self) -> str:
|
|
return "oms"
|
|
|
|
@property
|
|
def name(self) -> str:
|
|
return "Wizamart OMS"
|
|
|
|
@property
|
|
def description(self) -> str:
|
|
return "Order Management System for Luxembourg merchants"
|
|
|
|
@property
|
|
def features(self) -> list[str]:
|
|
"""OMS-specific features."""
|
|
return [
|
|
"order_management",
|
|
"inventory_basic",
|
|
"invoice_lu",
|
|
"letzshop_sync",
|
|
"customer_view",
|
|
]
|
|
|
|
@property
|
|
def enabled_modules(self) -> list[str]:
|
|
"""
|
|
OMS enables all major commerce modules.
|
|
|
|
Core modules (core, platform-admin) are always included.
|
|
"""
|
|
return [
|
|
# Core modules (always enabled, listed for clarity)
|
|
"core",
|
|
"platform-admin",
|
|
# Commerce modules
|
|
"billing",
|
|
"inventory",
|
|
"orders",
|
|
"marketplace",
|
|
"customers",
|
|
# Content & communication
|
|
"cms",
|
|
"analytics",
|
|
"messaging",
|
|
# Internal tools
|
|
"dev-tools",
|
|
"monitoring",
|
|
]
|
|
|
|
@property
|
|
def vendor_default_page_slugs(self) -> list[str]:
|
|
"""Default pages for OMS vendor storefronts."""
|
|
return [
|
|
"about",
|
|
"shipping",
|
|
"returns",
|
|
"privacy-policy",
|
|
"terms-of-service",
|
|
"contact",
|
|
"faq",
|
|
]
|
|
|
|
|
|
# Singleton instance
|
|
oms_config = OMSPlatformConfig()
|