Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX][CL] La cantidad debe ser positiva en apunte analítico #30

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

CILC98
Copy link

@CILC98 CILC98 commented Aug 28, 2024

No description provided.

Comment on lines +11 to +21
@api.model_create_multi
def create(self, vals):
"""
Antes de crear, se verifica que el campo de cantidad sea positivo
Si no lo es, se lo convierte a positivo
"""
for val in vals:
if 'unit_amount' in val:
if val['unit_amount'] < 0:
val['unit_amount'] = abs(val['unit_amount'])
return super().create(vals)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seguro no hay como desde los métodos que hereda el stock_move @CILC98??? Está muy agresivo desde el create...

Copy link
Author

@CILC98 CILC98 Aug 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Existe tal vez algún caso en que los apuntes analíticos deban tener la cantidad en negativo? Si no es así, creo que sería la mejor opción, ya que no solo desde un lugar se crean estos apuntes.

Copy link

github-actions bot commented Jan 5, 2025

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants