Se crea modelo de llamada y se hace valida fecha por defecto = hoy
This commit is contained in:
parent
f9f929ae1e
commit
d1def24dd6
@ -1,12 +1,14 @@
|
|||||||
from trytond.pool import Pool
|
from trytond.pool import Pool
|
||||||
from . import prospect
|
from . import prospect
|
||||||
from . import prospect_trace
|
from . import prospect_trace
|
||||||
|
from . import call
|
||||||
|
|
||||||
__all__ = ['register']
|
__all__ = ['register']
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
Pool.register(
|
Pool.register(
|
||||||
|
call.Call,
|
||||||
prospect.Prospect,
|
prospect.Prospect,
|
||||||
prospect_trace.ProspectTrace,
|
prospect_trace.ProspectTrace,
|
||||||
module='sale_opportunity_management', type_='model')
|
module='sale_opportunity_management', type_='model')
|
||||||
|
13
call.py
Normal file
13
call.py
Normal 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()
|
@ -6,6 +6,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
|
||||||
|
|
||||||
Activate modules::
|
Activate modules::
|
||||||
|
|
||||||
@ -36,3 +37,14 @@ Crear seguimiento de prospecto::
|
|||||||
'guchito S.A.S'
|
'guchito S.A.S'
|
||||||
>>> prospect_trace.prospect_tel
|
>>> 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
|
||||||
|
Loading…
Reference in New Issue
Block a user