fix(validators): update part_number_id validation to be optional in item creation
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user