feat: Se admite fecha y hora en llamada pendiente, closed #25
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Camilo Gonzalez 2023-08-14 20:00:41 -05:00
parent 0d1602fe1d
commit 8ab3a97b3c
2 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ class PendingCall(ModelSQL, ModelView):
'Llamada pendiente a un prospecto' 'Llamada pendiente a un prospecto'
__name__ = "sale.pending_call" __name__ = "sale.pending_call"
date = fields.Date('Date', required=True) date = fields.DateTime('Date', required=True)
def get_rec_name(self, name): def get_rec_name(self, name):
if self.date: if self.date:

View File

@ -7,7 +7,7 @@ Imports::
>>> from proteus import Model, Wizard >>> from proteus import Model, Wizard
>>> from trytond.tests.tools import activate_modules >>> from trytond.tests.tools import activate_modules
>>> from datetime import date, timedelta >>> from datetime import date, timedelta, datetime
>>> import xml.etree.ElementTree as ET >>> import xml.etree.ElementTree as ET
Activate modules:: Activate modules::
@ -202,11 +202,11 @@ Verificar estado final del seguimiento del prospecto y sus llamadas
Programar una próxima llamada pendiente al seguimiento de prospecto:: Programar una próxima llamada pendiente al seguimiento de prospecto::
>>> PendingCall = Model.get('sale.pending_call') >>> PendingCall = Model.get('sale.pending_call')
>>> pending_call = PendingCall() >>> pending_call = PendingCall()
>>> pending_call.date = date(year=2023, month=8, day=8) >>> pending_call.date = datetime(2023, 8, 14, 15, 30, 30)
>>> prospect_trace.pending_call = pending_call >>> prospect_trace.pending_call = pending_call
>>> prospect_trace.pending_call.date >>> prospect_trace.pending_call.date
datetime.date(2023, 8, 8) datetime.datetime(2023, 8, 14, 15, 30, 30)
>>> prospect_trace.state >>> prospect_trace.state
'with_pending_calls' 'with_pending_calls'