fix(validators): update part_number_id validation to be optional in item creation

This commit is contained in:
Galindo97
2026-01-22 12:26:57 -06:00
parent af863e624f
commit 0782e784ac
2 changed files with 3 additions and 9 deletions

View File

@@ -33,14 +33,8 @@ def validate_create(
code="REQUIRED"
)
# 2. Validar part_number_id
if not line.part_number_id:
errors.add_error(
field="part_number_id",
message="Part Number ID es obligatorio",
solution="Selecciona un número de parte válido del catálogo",
code="REQUIRED"
)
# 2. Validar part_number_id (OPCIONAL - ya no es obligatorio)
# El campo part_number_id ahora es opcional
# 3. Validar class_id
if not line.class_id:

View File

@@ -87,7 +87,7 @@
<!-- Descriptions -->
<fieldset class="border rounded-md p-2 space-y-2">
<div class="space-y-1">
<Label for="num_parte" class="text-xs">Número de Parte: <span class="text-red-500">*</span></Label>
<Label for="num_parte" class="text-xs">Número de Parte:</Label>
<div class="flex gap-1">
<Input
id="num_parte"