Overview
The nominas module manages employee information, payroll processing, and bonus/bonification tracking with full audit trails.Empleado
Employee model with contract information and system user integration.Primary key for the employee. Auto-generated by Django.
Link to Django authentication user.
to: User (Django auth)on_delete: SET_NULLnull: Trueblank: Truerelated_name: ‘empleado’verbose_name: “Usuario del sistema”
Employee’s full name.
max_length: 100verbose_name: “Nombre completo”
Job position/title.
max_length: 100blank: Truenull: Trueverbose_name: “Cargo”help_text: “Descripción del cargo (se usa el rol del usuario si está vinculado)”- Note: If linked to a user with a role, the role name is used instead
Base salary.
max_digits: 10decimal_places: 2verbose_name: “Salario base”
Date of hire.
verbose_name: “Fecha de contratación”
Current employment status.
max_length: 20choices: ESTADO_CHOICESdefault: ‘activo’verbose_name: “Estado”
Type of employment contract.
max_length: 20choices: TIPO_CONTRATO_CHOICESdefault: ‘tiempo_completo’verbose_name: “Tipo de contrato”
Employee email address.
max_length: 100blank: Truenull: Trueverbose_name: “Correo electrónico”
Phone number.
max_length: 20blank: Truenull: Truevalidators: RegexValidator for international formatverbose_name: “Teléfono”- Pattern:
^\+?1?\d{9,15}$
Employee address.
blank: Truenull: Trueverbose_name: “Dirección”
Record creation timestamp.
auto_now_add: Trueverbose_name: “Fecha de registro”
Last update timestamp.
auto_now: Trueverbose_name: “Última actualización”
Choice Fields
Available employment states:
| Value | Display |
|---|---|
activo | Activo |
inactivo | Inactivo |
vacaciones | Vacaciones |
permiso | Permiso |
suspendido | Suspendido |
Available contract types:
| Value | Display |
|---|---|
tiempo_completo | Tiempo Completo |
medio_tiempo | Medio Tiempo |
temporal | Temporal |
por_proyecto | Por Proyecto |
Methods
Properties
Related Fields
- pagos: Reverse relation to Pago (related_name=‘pagos’)
- bonificaciones: Reverse relation to Bonificacion (related_name=‘bonificaciones’)
Pago
Payment record model with audit trail.Primary key for the payment. Auto-generated by Django.
Reference to the employee.
to: Empleadoon_delete: CASCADErelated_name: ‘pagos’verbose_name: “Empleado”
Payment date.
default: timezone.nowverbose_name: “Fecha de pago”
Payment amount.
max_digits: 10decimal_places: 2verbose_name: “Monto”
Payment type.
max_length: 20choices: TIPO_CHOICESdefault: ‘salario’verbose_name: “Tipo de pago”
Payment description or notes.
blank: Truenull: Trueverbose_name: “Descripción”
Payment receipt/proof document.
upload_to: ‘nominas/comprobantes/’blank: Truenull: Trueverbose_name: “Comprobante”
User who created this payment record.
to: Useron_delete: SET_NULLnull: Trueblank: Truerelated_name: ‘pagos_creados’verbose_name: “Creado por”
User who last modified this payment record.
to: Useron_delete: SET_NULLnull: Trueblank: Truerelated_name: ‘pagos_modificados’verbose_name: “Modificado por”
Record creation timestamp.
auto_now_add: Trueverbose_name: “Fecha de creación”
Last modification timestamp.
auto_now: Trueverbose_name: “Última modificación”
Choice Fields
Available payment types:
| Value | Display |
|---|---|
salario | Salario |
bono | Bonificación |
vacaciones | Pago Vacaciones |
liquidacion | Liquidación |
otro | Otro |
Meta Options
- ordering:
['-fecha_pago'](most recent first) - verbose_name: “Pago”
- verbose_name_plural: “Pagos”
Bonificacion
Employee bonus/bonification model with validity period and audit trail.Primary key for the bonus. Auto-generated by Django.
Reference to the employee.
to: Empleadoon_delete: CASCADErelated_name: ‘bonificaciones’verbose_name: “Empleado”
Bonus name/description.
max_length: 100verbose_name: “Nombre”
Bonus amount.
max_digits: 10decimal_places: 2verbose_name: “Monto”
Whether the bonus is recurring.
default: Falseverbose_name: “¿Es recurrente?”
Start date of bonus validity.
verbose_name: “Fecha de inicio”
End date of bonus validity (optional for permanent bonuses).
blank: Truenull: Trueverbose_name: “Fecha de finalización (opcional)”
Whether the bonus is currently active.
default: Trueverbose_name: “Activa”
User who created this bonus.
to: Useron_delete: SET_NULLnull: Trueblank: Truerelated_name: ‘bonificaciones_creadas’verbose_name: “Creado por”
User who last modified this bonus.
to: Useron_delete: SET_NULLnull: Trueblank: Truerelated_name: ‘bonificaciones_modificadas’verbose_name: “Modificado por”
Record creation timestamp.
auto_now_add: Trueverbose_name: “Fecha de creación”
Last modification timestamp.
auto_now: Trueverbose_name: “Última modificación”
Methods
Properties
Meta Options
- ordering:
['-fecha_inicio'](most recent first) - verbose_name: “Bonificación”
- verbose_name_plural: “Bonificaciones”
