walking_skeleton/views #6

Merged
camilogs merged 17 commits from walking_skeleton into 6.8 2023-07-29 21:14:39 -05:00
3 changed files with 28 additions and 1 deletions
Showing only changes of commit d1def24dd6 - Show all commits

View File

@ -1,12 +1,14 @@
from trytond.pool import Pool
from . import prospect
from . import prospect_trace
from . import call
__all__ = ['register']
def register():
Pool.register(
call.Call,
prospect.Prospect,
prospect_trace.ProspectTrace,
module='sale_opportunity_management', type_='model')

13
call.py Normal file
View File

@ -0,0 +1,13 @@
from trytond.model import ModelSQL, ModelView, fields
from datetime import date
class Call(ModelSQL, ModelView):
'Llamada'
__name__ = 'sale.call'
date = fields.Date('Fecha', )
@classmethod
def default_date(cls):
return date.today()

View File

@ -6,6 +6,7 @@ Imports::
>>> from proteus import Model, Wizard
>>> from trytond.tests.tools import activate_modules
>>> from datetime import date
Activate modules::
@ -35,4 +36,15 @@ Crear seguimiento de prospecto::
>>> prospect_trace.prospect_name
'guchito S.A.S'
>>> prospect_trace.prospect_tel
3123423422
3123423422
----------------------------------------------------------------------------
Como operador quiero poder registrar una llamada para luego generar reportes
----------------------------------------------------------------------------
Crear llamada a un seguimiento de prospecto::
>>> Call = Model.get('sale.call')
>>> call = Call()
>>> call.date == date.today()
True