Compare commits
11 Commits
e97e8fa99d
...
Reportes
| Author | SHA1 | Date | |
|---|---|---|---|
| fa850b69ef | |||
| e40991de02 | |||
| b8ba775733 | |||
| 336a266578 | |||
| 22fb3736a7 | |||
| 5cc7ef011d | |||
| 72ae0cfa22 | |||
| 0b7d15f35b | |||
| 8a0aa29368 | |||
| f71e6f4671 | |||
| cf874db55f |
@@ -4,6 +4,7 @@ from . import prospect_trace
|
|||||||
from . import call
|
from . import call
|
||||||
from . import pending_call
|
from . import pending_call
|
||||||
from . import user
|
from . import user
|
||||||
|
from . import print_report_by_operator
|
||||||
from .locations import city
|
from .locations import city
|
||||||
from .locations import department
|
from .locations import department
|
||||||
|
|
||||||
@@ -14,8 +15,8 @@ def register():
|
|||||||
Pool.register(
|
Pool.register(
|
||||||
user.User,
|
user.User,
|
||||||
pending_call.PendingCall,
|
pending_call.PendingCall,
|
||||||
pending_call.PendingTask,
|
|
||||||
call.Call,
|
call.Call,
|
||||||
|
call.PendingTask,
|
||||||
department.Department,
|
department.Department,
|
||||||
city.City,
|
city.City,
|
||||||
prospect.ContactMethod,
|
prospect.ContactMethod,
|
||||||
@@ -28,6 +29,7 @@ def register():
|
|||||||
prospect_trace.MakeCallAskTask,
|
prospect_trace.MakeCallAskTask,
|
||||||
prospect.ReassignProspectByOperatorStart,
|
prospect.ReassignProspectByOperatorStart,
|
||||||
prospect.ReassignProspectByProspectStart,
|
prospect.ReassignProspectByProspectStart,
|
||||||
|
print_report_by_operator.PrintReportByOperatorStart,
|
||||||
module='sale_opportunity_management', type_='model')
|
module='sale_opportunity_management', type_='model')
|
||||||
Pool.register(
|
Pool.register(
|
||||||
prospect_trace.ScheduleCall,
|
prospect_trace.ScheduleCall,
|
||||||
@@ -35,6 +37,7 @@ def register():
|
|||||||
prospect_trace.MakeCall,
|
prospect_trace.MakeCall,
|
||||||
prospect.ReassignProspectByOperator,
|
prospect.ReassignProspectByOperator,
|
||||||
prospect.ReasignProspectByProspect,
|
prospect.ReasignProspectByProspect,
|
||||||
|
print_report_by_operator.PrintReportByOperator,
|
||||||
module='sale_opportunity_management', type_='wizard')
|
module='sale_opportunity_management', type_='wizard')
|
||||||
Pool.register(
|
Pool.register(
|
||||||
module='sale_opportunity_management', type_='report')
|
module='sale_opportunity_management', type_='report')
|
||||||
|
|||||||
43
call.py
43
call.py
@@ -1,7 +1,6 @@
|
|||||||
from trytond.model import ModelSQL, ModelView, fields
|
from trytond.model import ModelSQL, ModelView, fields
|
||||||
|
from trytond.pyson import Eval
|
||||||
from datetime import date
|
from datetime import date
|
||||||
|
|
||||||
|
|
||||||
from .selections.interest import Interest
|
from .selections.interest import Interest
|
||||||
from .selections.call_types import CallTypes
|
from .selections.call_types import CallTypes
|
||||||
from .selections.call_results import CallResults
|
from .selections.call_results import CallResults
|
||||||
@@ -47,3 +46,43 @@ class Call(ModelSQL, ModelView):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def default_date(cls):
|
def default_date(cls):
|
||||||
return date.today()
|
return date.today()
|
||||||
|
|
||||||
|
|
||||||
|
class PendingTask(ModelSQL, ModelView):
|
||||||
|
'Tarea a realizar a un seguimiento de prospecto'
|
||||||
|
__name__ = "sale.pending_task"
|
||||||
|
|
||||||
|
description = fields.Text(
|
||||||
|
'Description', required=True,
|
||||||
|
states={
|
||||||
|
'readonly': Eval('state') == 'done'
|
||||||
|
})
|
||||||
|
|
||||||
|
state = fields.Selection(
|
||||||
|
[('pending', 'Pending'),
|
||||||
|
('done', 'Done')],
|
||||||
|
'State')
|
||||||
|
|
||||||
|
prospect_trace = fields.Many2One(
|
||||||
|
'sale.prospect_trace', 'Prospect trace',
|
||||||
|
required=True, readonly=True)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def __setup__(cls):
|
||||||
|
super(PendingTask, cls).__setup__()
|
||||||
|
cls._buttons.update({
|
||||||
|
'close_task': {
|
||||||
|
'invisible': Eval('state') == 'done'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
@ModelView.button
|
||||||
|
def close_task(cls, tasks):
|
||||||
|
for task in tasks:
|
||||||
|
task.state = 'done'
|
||||||
|
task.save()
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def default_state(cls):
|
||||||
|
return 'pending'
|
||||||
|
|||||||
26
call.xml
26
call.xml
@@ -99,11 +99,37 @@ this repository contains the full copyright notices and license terms. -->
|
|||||||
<field name="view" ref="pending_task_view_form"/>
|
<field name="view" ref="pending_task_view_form"/>
|
||||||
<field name="act_window" ref="act_pending_task_tree"/>
|
<field name="act_window" ref="act_pending_task_tree"/>
|
||||||
</record>
|
</record>
|
||||||
|
<record model="ir.action.act_window.domain" id="act_task_domain_pending">
|
||||||
|
<field name="name">Pending</field>
|
||||||
|
<field name="sequence" eval="10"/>
|
||||||
|
<field name="domain" eval="[('state', '=', 'pending')]" pyson="1"/>
|
||||||
|
<field name="count" eval="True"/>
|
||||||
|
<field name="act_window" ref="act_pending_task_tree"/>
|
||||||
|
</record>
|
||||||
|
<record model="ir.action.act_window.domain" id="act_task_domain_done">
|
||||||
|
<field name="name">Done</field>
|
||||||
|
<field name="sequence" eval="20"/>
|
||||||
|
<field name="domain" eval="[('state', '=', 'done')]" pyson="1"/>
|
||||||
|
<field name="count" eval="True"/>
|
||||||
|
<field name="act_window" ref="act_pending_task_tree"/>
|
||||||
|
</record>
|
||||||
|
<record model="ir.action.act_window.domain" id="act_task_domain_all">
|
||||||
|
<field name="name">All</field>
|
||||||
|
<field name="sequence" eval="9999"/>
|
||||||
|
<field name="domain"/>
|
||||||
|
<field name="count" eval="True"/>
|
||||||
|
<field name="act_window" ref="act_pending_task_tree"/>
|
||||||
|
</record>
|
||||||
<menuitem
|
<menuitem
|
||||||
parent="menu_calls"
|
parent="menu_calls"
|
||||||
sequence="60"
|
sequence="60"
|
||||||
id="menu_pending_tasks"
|
id="menu_pending_tasks"
|
||||||
action="act_pending_task_tree"
|
action="act_pending_task_tree"
|
||||||
icon="tryton-graph"/>
|
icon="tryton-graph"/>
|
||||||
|
<record model="ir.model.button" id="close_task_button">
|
||||||
|
<field name="name">close_task</field>
|
||||||
|
<field name="string">Close task</field>
|
||||||
|
<field name="model" search="[('model', '=', 'sale.pending_task')]"/>
|
||||||
|
</record>
|
||||||
</data>
|
</data>
|
||||||
</tryton>
|
</tryton>
|
||||||
|
|||||||
79
locale/es.po
79
locale/es.po
@@ -2,10 +2,6 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
|
||||||
msgctxt "field:res.user,user_admin:"
|
|
||||||
msgid "Is Admin"
|
|
||||||
msgstr "Es Administrador"
|
|
||||||
|
|
||||||
msgctxt "model:res.group,name:group_prospect"
|
msgctxt "model:res.group,name:group_prospect"
|
||||||
msgid "Prospects"
|
msgid "Prospects"
|
||||||
msgstr "Prospectos"
|
msgstr "Prospectos"
|
||||||
@@ -30,6 +26,10 @@ msgctxt "model:res.group,name:group_prospect_trace_admin"
|
|||||||
msgid "Traces Administrator"
|
msgid "Traces Administrator"
|
||||||
msgstr "Administración de Seguimientos"
|
msgstr "Administración de Seguimientos"
|
||||||
|
|
||||||
|
msgctxt "field:res.user,user_admin:"
|
||||||
|
msgid "Is Admin"
|
||||||
|
msgstr "Es Administrador"
|
||||||
|
|
||||||
msgctxt "field:sale.prospect_trace,prospect:"
|
msgctxt "field:sale.prospect_trace,prospect:"
|
||||||
msgid "Prospect"
|
msgid "Prospect"
|
||||||
msgstr "Prospecto"
|
msgstr "Prospecto"
|
||||||
@@ -76,7 +76,11 @@ msgstr "Unidad de negocio"
|
|||||||
|
|
||||||
msgctxt "view:sale.prospect:"
|
msgctxt "view:sale.prospect:"
|
||||||
msgid "Contact methods"
|
msgid "Contact methods"
|
||||||
msgstr "Metodos de contacto"
|
msgstr "Métodos de contacto"
|
||||||
|
|
||||||
|
msgctxt "view:sale.prospect:"
|
||||||
|
msgid "About prospect"
|
||||||
|
msgstr "Tipificación del prospecto"
|
||||||
|
|
||||||
msgctxt "field:sale.prospect,contact_methods:"
|
msgctxt "field:sale.prospect,contact_methods:"
|
||||||
msgid "Contact methods"
|
msgid "Contact methods"
|
||||||
@@ -102,6 +106,14 @@ msgctxt "field:sale.prospect,prospect_trace:"
|
|||||||
msgid "Prospect trace"
|
msgid "Prospect trace"
|
||||||
msgstr "Seguimiento de prospecto"
|
msgstr "Seguimiento de prospecto"
|
||||||
|
|
||||||
|
msgctxt "field:sale.prospect,rating:"
|
||||||
|
msgid "Rating (1-5)"
|
||||||
|
msgstr "Calificación (1-5)"
|
||||||
|
|
||||||
|
msgctxt "field:sale.prospect,comments:"
|
||||||
|
msgid "Comments"
|
||||||
|
msgstr "Comentarios"
|
||||||
|
|
||||||
msgctxt "field:sale.call,date:"
|
msgctxt "field:sale.call,date:"
|
||||||
msgid "Date"
|
msgid "Date"
|
||||||
msgstr "Fecha"
|
msgstr "Fecha"
|
||||||
@@ -226,6 +238,21 @@ msgctxt "field:sale.prospect_trace.make_call.ask,datetime:"
|
|||||||
msgid "Date time"
|
msgid "Date time"
|
||||||
msgstr "Fecha y hora"
|
msgstr "Fecha y hora"
|
||||||
|
|
||||||
|
msgctxt "field:sale.pending_task,description:"
|
||||||
|
msgid "Description"
|
||||||
|
msgstr "Descripción"
|
||||||
|
|
||||||
|
msgctxt "field:sale.pending_task,prospect_trace:"
|
||||||
|
msgid "Prospect trace"
|
||||||
|
msgstr "Seguimiento de prospecto"
|
||||||
|
|
||||||
|
msgctxt "field:sale.prospect_trace.make_call.start,schedule_task:"
|
||||||
|
msgid "Schedule task?"
|
||||||
|
msgstr "¿Agendar tarea?"
|
||||||
|
|
||||||
|
msgctxt "field:sale.prospect_trace.make_call.ask_task,task_description:"
|
||||||
|
msgid "Task description"
|
||||||
|
msgstr "Descripción de la tarea"
|
||||||
|
|
||||||
msgctxt "selection:sale.prospect,business_unit:"
|
msgctxt "selection:sale.prospect,business_unit:"
|
||||||
msgid "Brigade"
|
msgid "Brigade"
|
||||||
@@ -259,6 +286,10 @@ msgctxt "selection:prospect.contact_method,contact_type:"
|
|||||||
msgid "Mail"
|
msgid "Mail"
|
||||||
msgstr "Correo electrónico"
|
msgstr "Correo electrónico"
|
||||||
|
|
||||||
|
msgctxt "selection:sale.prospect,rating:"
|
||||||
|
msgid "None"
|
||||||
|
msgstr "Sin calificación"
|
||||||
|
|
||||||
msgctxt "selection:sale.prospect.assign.start,business_unit:"
|
msgctxt "selection:sale.prospect.assign.start,business_unit:"
|
||||||
msgid "Brigade"
|
msgid "Brigade"
|
||||||
msgstr "Brigada"
|
msgstr "Brigada"
|
||||||
@@ -387,6 +418,11 @@ msgctxt "selection:sale.call,call_business_unit:"
|
|||||||
msgid "Equipment"
|
msgid "Equipment"
|
||||||
msgstr "Equipos"
|
msgstr "Equipos"
|
||||||
|
|
||||||
|
msgctxt "selection:sale.prospect_trace.make_call.start,schedule_task:"
|
||||||
|
msgid "Yes"
|
||||||
|
msgstr "Si"
|
||||||
|
|
||||||
|
|
||||||
msgctxt "model:ir.ui.menu,name:menu_calls"
|
msgctxt "model:ir.ui.menu,name:menu_calls"
|
||||||
msgid "Calls"
|
msgid "Calls"
|
||||||
msgstr "Llamadas"
|
msgstr "Llamadas"
|
||||||
@@ -419,6 +455,10 @@ msgctxt "model:ir.ui.menu,name:menu_reassign_by_prospect_wizard"
|
|||||||
msgid "Reassign by prospect"
|
msgid "Reassign by prospect"
|
||||||
msgstr "Reasignar por prospecto"
|
msgstr "Reasignar por prospecto"
|
||||||
|
|
||||||
|
msgctxt "model:ir.ui.menu,name:menu_pending_tasks"
|
||||||
|
msgid "Pending tasks"
|
||||||
|
msgstr "Tareas pendientes"
|
||||||
|
|
||||||
|
|
||||||
msgctxt "model:ir.model.button,string:schedule_call_wizard_button"
|
msgctxt "model:ir.model.button,string:schedule_call_wizard_button"
|
||||||
msgid "Schedule call"
|
msgid "Schedule call"
|
||||||
@@ -436,6 +476,10 @@ msgctxt "model:ir.model.button,string:reopen_trace_button"
|
|||||||
msgid "Reopen trace"
|
msgid "Reopen trace"
|
||||||
msgstr "Reabrir seguimiento"
|
msgstr "Reabrir seguimiento"
|
||||||
|
|
||||||
|
msgctxt "model:ir.model.button,string:close_task_button"
|
||||||
|
msgid "Close task"
|
||||||
|
msgstr "Cerrar tarea"
|
||||||
|
|
||||||
|
|
||||||
msgctxt "wizard_button:sale.prospect_trace.make_call,start,end:"
|
msgctxt "wizard_button:sale.prospect_trace.make_call,start,end:"
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
@@ -451,7 +495,7 @@ msgstr "Cancelar"
|
|||||||
|
|
||||||
msgctxt "wizard_button:sale.prospect_trace.make_call,ask,schedule_call:"
|
msgctxt "wizard_button:sale.prospect_trace.make_call,ask,schedule_call:"
|
||||||
msgid "Schedule call"
|
msgid "Schedule call"
|
||||||
msgstr "Agendar"
|
msgstr "Agendar llamada"
|
||||||
|
|
||||||
msgctxt "wizard_button:sale.prospect_trace.schedule,start,end:"
|
msgctxt "wizard_button:sale.prospect_trace.schedule,start,end:"
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
@@ -459,7 +503,15 @@ msgstr "Cancelar"
|
|||||||
|
|
||||||
msgctxt "wizard_button:sale.prospect_trace.schedule,start,schedule:"
|
msgctxt "wizard_button:sale.prospect_trace.schedule,start,schedule:"
|
||||||
msgid "Schedule"
|
msgid "Schedule"
|
||||||
msgstr "Agendar"
|
msgstr "Agendar llamada"
|
||||||
|
|
||||||
|
msgctxt "wizard_button:sale.prospect_trace.make_call,ask_task,end:"
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr "Cancelar"
|
||||||
|
|
||||||
|
msgctxt "wizard_button:sale.prospect_trace.make_call,ask_task,schedule_task:"
|
||||||
|
msgid "Schedule task"
|
||||||
|
msgstr "Agendar tarea"
|
||||||
|
|
||||||
msgctxt "wizard_button:sale.prospect.assign,start,end:"
|
msgctxt "wizard_button:sale.prospect.assign,start,end:"
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
@@ -513,6 +565,19 @@ msgctxt "model:ir.action.act_window.domain,name:act_prospect_domain_assigned"
|
|||||||
msgid "Assigned"
|
msgid "Assigned"
|
||||||
msgstr "Asignado"
|
msgstr "Asignado"
|
||||||
|
|
||||||
|
msgctxt "model:ir.action.act_window.domain,name:act_task_domain_pending"
|
||||||
|
msgid "Pending"
|
||||||
|
msgstr "Pendiente"
|
||||||
|
|
||||||
|
msgctxt "model:ir.action.act_window.domain,name:act_task_domain_done"
|
||||||
|
msgid "Done"
|
||||||
|
msgstr "Completado"
|
||||||
|
|
||||||
|
msgctxt "model:ir.action.act_window.domain,name:act_task_domain_all"
|
||||||
|
msgid "All"
|
||||||
|
msgstr "Todo"
|
||||||
|
|
||||||
|
|
||||||
msgctxt "model:ir.action,name:schedule_call_wizard"
|
msgctxt "model:ir.action,name:schedule_call_wizard"
|
||||||
msgid "Schedule call"
|
msgid "Schedule call"
|
||||||
msgstr "Agendar llamada"
|
msgstr "Agendar llamada"
|
||||||
|
|||||||
@@ -12,18 +12,3 @@ class PendingCall(ModelSQL, ModelView):
|
|||||||
def get_rec_name(self, name):
|
def get_rec_name(self, name):
|
||||||
if self.date:
|
if self.date:
|
||||||
return str(self.date)
|
return str(self.date)
|
||||||
|
|
||||||
|
|
||||||
class PendingTask(ModelSQL, ModelView):
|
|
||||||
'Tarea pendiente a un seguimiento de prospecto'
|
|
||||||
__name__ = "sale.pending_task"
|
|
||||||
|
|
||||||
description = fields.Text('Description', required=True)
|
|
||||||
done = fields.Boolean('Done')
|
|
||||||
prospect_trace = fields.Many2One(
|
|
||||||
'sale.prospect_trace', 'Prospect trace',
|
|
||||||
required=True, readonly=True)
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def default_done(cls):
|
|
||||||
return False
|
|
||||||
|
|||||||
24
print_report_by_operator.py
Normal file
24
print_report_by_operator.py
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# 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.wizard import Wizard, StateView, Button # , StateReport
|
||||||
|
from trytond.model import fields, ModelView
|
||||||
|
|
||||||
|
|
||||||
|
class PrintReportByOperatorStart(ModelView):
|
||||||
|
'Vista inicial de reporte por operario'
|
||||||
|
__name__ = 'sale.print_report_by_operator.start'
|
||||||
|
|
||||||
|
start_date = fields.Date('Start date')
|
||||||
|
end_date = fields.Date('End date')
|
||||||
|
|
||||||
|
|
||||||
|
class PrintReportByOperator(Wizard):
|
||||||
|
'Generar reporte por operario'
|
||||||
|
__name__ = 'sale.print_report_by_operator'
|
||||||
|
|
||||||
|
start = StateView(
|
||||||
|
'sale.print_report_by_operator.start',
|
||||||
|
'sale_opportunity_management.print_report_by_operator_start_view_form',
|
||||||
|
[Button("Cancel", "end", "tryton-cancel"),
|
||||||
|
Button("Print Report", "print_report", "tryton-ok", default=True)])
|
||||||
16
print_report_by_operator.xml
Normal file
16
print_report_by_operator.xml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<!-- <?xml version="1.0"?>
|
||||||
|
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
|
this repository contains the full copyright notices and license terms. -->
|
||||||
|
<tryton>
|
||||||
|
<data>
|
||||||
|
<record model="ir.action.wizard" id="print_report_by_operator_wizard">
|
||||||
|
<field name="name">Print report by operator</field>
|
||||||
|
<field name="wiz_name">sale.print_report_by_operator</field>
|
||||||
|
</record>
|
||||||
|
<record model="ir.ui.view" id="print_report_by_operator_start_view_form">
|
||||||
|
<field name="model">sale.print_report_by_operator.start</field>
|
||||||
|
<field name="type">form</field>
|
||||||
|
<field name="name">print_report_by_operator_start_form</field>
|
||||||
|
</record>
|
||||||
|
<data>
|
||||||
|
<tryton/> -->
|
||||||
13
prospect.py
13
prospect.py
@@ -1,12 +1,12 @@
|
|||||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
# this repository contains the full copyright notices and license terms.
|
# this repository contains the full copyright notices and license terms.
|
||||||
from trytond.wizard import Wizard, StateView, Button, StateTransition
|
from trytond.wizard import Wizard, StateView, Button, StateTransition
|
||||||
from trytond.model import ModelSQL, ModelView, fields
|
from trytond.model import ModelSQL, ModelView, fields, DeactivableMixin
|
||||||
from trytond.pyson import Eval, If
|
from trytond.pyson import Eval, If
|
||||||
from trytond.pool import Pool
|
from trytond.pool import Pool
|
||||||
|
|
||||||
|
|
||||||
class Prospect(ModelSQL, ModelView):
|
class Prospect(ModelSQL, ModelView, DeactivableMixin):
|
||||||
'Prospecto'
|
'Prospecto'
|
||||||
__name__ = 'sale.prospect'
|
__name__ = 'sale.prospect'
|
||||||
_rec_name = 'name'
|
_rec_name = 'name'
|
||||||
@@ -38,6 +38,15 @@ class Prospect(ModelSQL, ModelView):
|
|||||||
|
|
||||||
prospect_trace = fields.Many2One('sale.prospect_trace', 'Prospect trace')
|
prospect_trace = fields.Many2One('sale.prospect_trace', 'Prospect trace')
|
||||||
|
|
||||||
|
rating = fields.Selection(
|
||||||
|
[(None, None),
|
||||||
|
('1', '1'),
|
||||||
|
('2', '2'),
|
||||||
|
('3', '3'),
|
||||||
|
('4', '4'),
|
||||||
|
('5', '5')], 'Rating (1-5)')
|
||||||
|
comments = fields.Text('Comments')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def default_state(cls):
|
def default_state(cls):
|
||||||
return 'unassigned'
|
return 'unassigned'
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ this repository contains the full copyright notices and license terms. -->
|
|||||||
|
|
||||||
<record model="ir.action.act_window" id="act_prospect_tree">
|
<record model="ir.action.act_window" id="act_prospect_tree">
|
||||||
<field name="name">Prospects</field>
|
<field name="name">Prospects</field>
|
||||||
|
<field name="domain"
|
||||||
|
eval="[If(Eval('context', {}).get('user_admin', None), (), ('assigned_operator', '=', Eval('_user')))]"
|
||||||
|
pyson="1"/>
|
||||||
<field name="res_model">sale.prospect</field>
|
<field name="res_model">sale.prospect</field>
|
||||||
</record>
|
</record>
|
||||||
<record model="ir.ui.view" id="prospect_view_tree">
|
<record model="ir.ui.view" id="prospect_view_tree">
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ class ProspectTrace(ModelSQL, ModelView):
|
|||||||
'Business unit', states=_states
|
'Business unit', states=_states
|
||||||
)
|
)
|
||||||
prospect_contacts = fields.One2Many(
|
prospect_contacts = fields.One2Many(
|
||||||
'prospect.contact_method', 'prospect_trace', 'Prospect contacts',
|
'prospect.contact_method', 'prospect_trace',
|
||||||
states=_states)
|
'Prospect contacts', required=True)
|
||||||
prospect_city = fields.Many2One('sale.city', 'City',
|
prospect_city = fields.Many2One('sale.city', 'City',
|
||||||
states=_states)
|
states=_states)
|
||||||
|
|
||||||
@@ -49,6 +49,11 @@ class ProspectTrace(ModelSQL, ModelView):
|
|||||||
], 'State',
|
], 'State',
|
||||||
states=_states)
|
states=_states)
|
||||||
|
|
||||||
|
@fields.depends('prospect_contacts', 'prospect')
|
||||||
|
def on_change_prospect_contacts(self):
|
||||||
|
for contact in self.prospect_contacts:
|
||||||
|
contact.prospect = self.prospect
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __setup__(cls):
|
def __setup__(cls):
|
||||||
super(ProspectTrace, cls).__setup__()
|
super(ProspectTrace, cls).__setup__()
|
||||||
|
|||||||
@@ -95,6 +95,10 @@ Crear tercer prospecto::
|
|||||||
>>> prospect3.business_unit = 'optics'
|
>>> prospect3.business_unit = 'optics'
|
||||||
>>> prospect3.save()
|
>>> prospect3.save()
|
||||||
|
|
||||||
|
Asignar tipificación a un prospecto
|
||||||
|
>>> prospect3.rating = '1'
|
||||||
|
>>> prospect3.comments = 'Calificación al cliente'
|
||||||
|
|
||||||
------------------------------------
|
------------------------------------
|
||||||
Asignación de prospectos a operarios
|
Asignación de prospectos a operarios
|
||||||
------------------------------------
|
------------------------------------
|
||||||
@@ -192,6 +196,11 @@ Verificar creación de seguimiento de prospecto::
|
|||||||
>>> prospect_trace.prospect_contacts
|
>>> prospect_trace.prospect_contacts
|
||||||
[proteus.Model.get('prospect.contact_method')(1), proteus.Model.get('prospect.contact_method')(2), proteus.Model.get('prospect.contact_method')(3)]
|
[proteus.Model.get('prospect.contact_method')(1), proteus.Model.get('prospect.contact_method')(2), proteus.Model.get('prospect.contact_method')(3)]
|
||||||
|
|
||||||
|
Agregar un método de contacto desde el seguimiento de prospecto::
|
||||||
|
>>> contact_method_ = prospect_trace.prospect_contacts.new(value='31231231212', name='Carlos', job='Supervisor')
|
||||||
|
>>> contact_method_.prospect
|
||||||
|
proteus.Model.get('sale.prospect')(1)
|
||||||
|
|
||||||
|
|
||||||
Crear llamadas a un seguimiento de prospecto::
|
Crear llamadas a un seguimiento de prospecto::
|
||||||
>>> make_call = Wizard('sale.prospect_trace.make_call', [prospect_trace])
|
>>> make_call = Wizard('sale.prospect_trace.make_call', [prospect_trace])
|
||||||
@@ -265,7 +274,7 @@ Crear una llamada agendada previamente::
|
|||||||
>>> prospect_trace.state
|
>>> prospect_trace.state
|
||||||
'open'
|
'open'
|
||||||
|
|
||||||
Hacer llamada y programar tarea
|
Hacer llamada y programar tarea::
|
||||||
>>> make_call = Wizard('sale.prospect_trace.make_call', [prospect_trace])
|
>>> make_call = Wizard('sale.prospect_trace.make_call', [prospect_trace])
|
||||||
>>> make_call.form.description = 'Prospect told me to send him an email'
|
>>> make_call.form.description = 'Prospect told me to send him an email'
|
||||||
>>> make_call.form.interest = '3'
|
>>> make_call.form.interest = '3'
|
||||||
@@ -282,6 +291,13 @@ Hacer llamada y programar tarea
|
|||||||
>>> task
|
>>> task
|
||||||
proteus.Model.get('sale.pending_task')(1)
|
proteus.Model.get('sale.pending_task')(1)
|
||||||
|
|
||||||
|
>>> task.state
|
||||||
|
'pending'
|
||||||
|
|
||||||
|
>>> task.click('close_task')
|
||||||
|
>>> task.state
|
||||||
|
'done'
|
||||||
|
|
||||||
Hacer llamada y cerrar venta (Seguimiento de prospecto)::
|
Hacer llamada y cerrar venta (Seguimiento de prospecto)::
|
||||||
>>> make_call = Wizard('sale.prospect_trace.make_call', [prospect_trace])
|
>>> make_call = Wizard('sale.prospect_trace.make_call', [prospect_trace])
|
||||||
>>> make_call.form.description = 'Closed sale'
|
>>> make_call.form.description = 'Closed sale'
|
||||||
@@ -349,8 +365,14 @@ Crear un usuario de rol administrador::
|
|||||||
>>> admin.user_admin == True
|
>>> admin.user_admin == True
|
||||||
True
|
True
|
||||||
|
|
||||||
|
.. Generar reporte por operario y consolidado::
|
||||||
|
.. >>> PrintReportByOperator = Model.get('sale.print_report_by_operato`r', type='wizard')
|
||||||
|
.. >>> session_id, _, _ = PrintReportByOperator.create()
|
||||||
|
|
||||||
|
.. >>> print_report_by_operator = Wizard('sale.print_report_by_operator', [])
|
||||||
|
.. >>> print_report_by_operator.form.start_date = date.today()
|
||||||
|
.. >>> print_report_by_operator.form.end_date = date.today()
|
||||||
|
.. >>> print_report_by_operator.execute('print_report')
|
||||||
|
|
||||||
--------
|
--------
|
||||||
Reportes
|
Reportes
|
||||||
|
|||||||
@@ -4,4 +4,5 @@ this repository contains the full copyright notices and license terms. -->
|
|||||||
<tree>
|
<tree>
|
||||||
<field name="prospect_trace" expand="1"/>
|
<field name="prospect_trace" expand="1"/>
|
||||||
<field name="description" expand="1"/>
|
<field name="description" expand="1"/>
|
||||||
|
<button name="close_task"/>
|
||||||
</tree>
|
</tree>
|
||||||
7
view/print_report_by_operator_start_form.xml
Normal file
7
view/print_report_by_operator_start_form.xml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
|
this repository contains the full copyright notices and license terms. -->
|
||||||
|
<tree>
|
||||||
|
<field name="start_date" expand="1"/>
|
||||||
|
<field name="end_date" expand="1"/>
|
||||||
|
</tree>
|
||||||
@@ -22,13 +22,24 @@ this repository contains the full copyright notices and license terms. -->
|
|||||||
<page string="Contact methods" id="contact_methods">
|
<page string="Contact methods" id="contact_methods">
|
||||||
<field name="contact_methods" colspan="2"/>
|
<field name="contact_methods" colspan="2"/>
|
||||||
</page>
|
</page>
|
||||||
|
<page string="About prospect" id="contact_methods">
|
||||||
|
<label name="rating"/>
|
||||||
|
<field name="rating"/>
|
||||||
|
<newline/>
|
||||||
|
<label name="comments"/>
|
||||||
|
<field name="comments"/>
|
||||||
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
<newline/>
|
<newline/>
|
||||||
|
|
||||||
<group col="4" id="stated">
|
<group col="6" colspan="5" id="footer" yalign="0">
|
||||||
<label name="assigned_operator"/>
|
<label name="assigned_operator"/>
|
||||||
<field name="assigned_operator"/>
|
<field name="assigned_operator"/>
|
||||||
<label name="state"/>
|
<label name="state"/>
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
|
<group col="-1" colspan="1" id="checkboxes">
|
||||||
|
<label name="active"/>
|
||||||
|
<field name="active" xexpand="0" width="25"/>
|
||||||
|
</group>
|
||||||
</group>
|
</group>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -7,4 +7,5 @@ this repository contains the full copyright notices and license terms. -->
|
|||||||
<field name="department" expand="1"/>
|
<field name="department" expand="1"/>
|
||||||
<field name="city" expand="1"/>
|
<field name="city" expand="1"/>
|
||||||
<field name="assigned_operator" expand="1"/>
|
<field name="assigned_operator" expand="1"/>
|
||||||
|
<field name="rating" expand="1"/>
|
||||||
</tree>
|
</tree>
|
||||||
Reference in New Issue
Block a user