From 2cc38647676d25d8fb8dfa851742d7358016c926 Mon Sep 17 00:00:00 2001 From: camilogs Date: Sat, 12 Aug 2023 20:37:57 -0500 Subject: [PATCH] =?UTF-8?q?feat:=20Se=20a=C3=B1ade=20posibilidad=20de=20ce?= =?UTF-8?q?rrar=20(archivar)=20seguimiento=20a=20prospectos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prospect_trace.py | 6 +++--- view/prospect_trace_form.xml | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/prospect_trace.py b/prospect_trace.py index 4189c5d..a2f1088 100644 --- a/prospect_trace.py +++ b/prospect_trace.py @@ -1,13 +1,13 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -from trytond.model import ModelSQL, ModelView, fields +from trytond.model import ModelSQL, ModelView, fields, DeactivableMixin from trytond.pool import Pool from .selections.call_types import CallTypes from .selections.interest import Interest -class ProspectTrace(ModelSQL, ModelView): +class ProspectTrace(DeactivableMixin, ModelSQL, ModelView): 'Seguimiento de un prospecto' __name__ = 'sale.prospect_trace' @@ -47,7 +47,7 @@ class ProspectTrace(ModelSQL, ModelView): @fields.depends('pending_calls', 'state') def on_change_pending_calls(self): - if len(self.pending_calls) > 0: + if len(self.pending_calls) >= 1: self.state = 'with_pending_calls' @fields.depends('prospect') diff --git a/view/prospect_trace_form.xml b/view/prospect_trace_form.xml index bf255d4..b36fc4b 100644 --- a/view/prospect_trace_form.xml +++ b/view/prospect_trace_form.xml @@ -2,6 +2,9 @@
+