refactor(Asignación de prospectos): se extrae método

This commit is contained in:
2024-01-28 13:54:26 -05:00
parent cd0564c95f
commit 6f69709823
8 changed files with 212 additions and 137 deletions

View File

@@ -59,3 +59,13 @@ class Prospect(ModelSQL, ModelView, DeactivableMixin):
def on_change_city(self):
if self.city:
self.department = self.city.parent
# TODO assign to current user if is operator
# @classmethod
# def create(cls, values):
# records = super().create(values)
# Transaction.atexit(
# lambda: cls.try_assign_to_current_operator(records))
# @classmethod
# def try_assign_to_current_operator(cls, prospect, user)