Overview
The Projects module enables you to manage client contracts, track resource assignments, and monitor project lifecycles from initiation to closure. Each project is associated with a partner (client) and maintains complete audit trails of all resources and activities.Core Models
Project
Represents a service contract with a client. Projects remain active until explicitly closed and serve as the parent container for all resource assignments and work activities.Partner Association
Each project is linked to a Partner (client) who is billed for services
Location Tracking
Track campamento (location) and cardinal points (NORTE, SUR, ESTE, OESTE, etc.)
Contact Management
Store contact name and phone number for on-site coordination
Lifecycle Control
Manage start_date, end_date, and is_closed status
Key Fields
Projects use logical deletion (
is_deleted from BaseModel) to preserve historical records. The is_closed field controls whether new resources can be assigned.Project Resource Assignment
ProjectResourceItem
Links physical equipment (ResourceItem) to projects with rental costs, maintenance scheduling, and operational date ranges.
Resource Assignment Features
Resource Assignment Features
- Cost Tracking: Separate fields for rental cost and maintenance cost
- Maintenance Scheduling: Frequency-based scheduling with three modes
- Operation Dates: Track when equipment enters and exits service
- Retirement Tracking: Record retirement date and reason when equipment is removed
Frequency-Based Maintenance Scheduling
The system supports three scheduling modes:Interval Days
frequency_type = ‘DAY’Maintenance every N days
interval_days = 2 means every 2 daysWeekdays
frequency_type = ‘WEEK’Specific days of the week
weekdays = [0, 2, 4] means Monday, Wednesday, FridayMonth Days
frequency_type = ‘MONTH’Specific days of the month
monthdays = [1, 15, 28] means 1st, 15th, and 28thCode Example: Assigning Resources
Project Lifecycle
1. Project Creation
2. Resource Retirement
When equipment needs to be removed from a project:Data Model Reference
ProjectResourceItem Fields
| Field | Type | Description |
|---|---|---|
project | ForeignKey | Reference to Project |
resource_item | ForeignKey | Reference to ResourceItem (equipment) |
type_resource | CharField | ’EQUIPO’ or ‘SERVICIO’ |
detailed_description | CharField | Additional details (max 120 chars) |
physical_equipment_code | PositiveSmallIntegerField | Physical identifier code |
cost | DecimalField | Rental or service cost |
frequency_type | CharField | ’DAY’, ‘WEEK’, or ‘MONTH’ |
interval_days | PositiveIntegerField | Days between maintenance (when frequency_type=‘DAY’) |
weekdays | JSONField | List of weekdays [0-6] (when frequency_type=‘WEEK’) |
monthdays | JSONField | List of month days [1-31] (when frequency_type=‘MONTH’) |
operation_start_date | DateField | When equipment enters service |
operation_end_date | DateField | When equipment exits service |
is_retired | BooleanField | Whether equipment has been removed |
retirement_date | DateField | Date equipment was removed |
retirement_reason | TextField | Reason for removal |
Cardinal Points Reference
Projects support the following cardinal directions for location tracking:- NORTE (North)
- SUR (South)
- ESTE (East)
- OESTE (West)
- NORESTE (Northeast)
- NOROESTE (Northwest)
- SURESTE (Southeast)
- SUROESTE (Southwest)
Best Practices
Resource Management
Resource Management
- Always set
operation_start_dateandoperation_end_datefor tracking - Use
is_retiredinstead of deleting ProjectResourceItem records - Document retirement reasons for audit trail
Maintenance Scheduling
Maintenance Scheduling
- Choose frequency_type based on client requirements
- Use ‘DAY’ for simple intervals (every 2 days, every 7 days)
- Use ‘WEEK’ for specific weekdays (Monday/Wednesday/Friday)
- Use ‘MONTH’ for monthly schedules (1st and 15th of month)
Project Closure
Project Closure
- Set
is_closed = Trueinstead of deleting projects - Retire all resources before closing project
- Ensure all work orders and custody chains are finalized
Related Features
Equipment
Manage the resource items assigned to projects
Work Orders
Track work activities on project resources
Custody Chains
Document responsibility transfers and waste handling
Maintenance
Schedule and track equipment maintenance