Compare commits
1 Commits
5873d35f12
...
Reportes
| Author | SHA1 | Date | |
|---|---|---|---|
| fa850b69ef |
@@ -4,6 +4,7 @@ from . import prospect_trace
|
||||
from . import call
|
||||
from . import pending_call
|
||||
from . import user
|
||||
from . import print_report_by_operator
|
||||
from .locations import city
|
||||
from .locations import department
|
||||
|
||||
@@ -28,6 +29,7 @@ def register():
|
||||
prospect_trace.MakeCallAskTask,
|
||||
prospect.ReassignProspectByOperatorStart,
|
||||
prospect.ReassignProspectByProspectStart,
|
||||
print_report_by_operator.PrintReportByOperatorStart,
|
||||
module='sale_opportunity_management', type_='model')
|
||||
Pool.register(
|
||||
prospect_trace.ScheduleCall,
|
||||
@@ -35,6 +37,7 @@ def register():
|
||||
prospect_trace.MakeCall,
|
||||
prospect.ReassignProspectByOperator,
|
||||
prospect.ReasignProspectByProspect,
|
||||
print_report_by_operator.PrintReportByOperator,
|
||||
module='sale_opportunity_management', type_='wizard')
|
||||
Pool.register(
|
||||
module='sale_opportunity_management', type_='report')
|
||||
|
||||
3
call.py
3
call.py
@@ -67,9 +67,6 @@ class PendingTask(ModelSQL, ModelView):
|
||||
'sale.prospect_trace', 'Prospect trace',
|
||||
required=True, readonly=True)
|
||||
|
||||
contacts = fields.One2Many(
|
||||
'prospect.contact_method', 'task', 'Contacts', readonly=True)
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(PendingTask, cls).__setup__()
|
||||
|
||||
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/> -->
|
||||
@@ -74,7 +74,6 @@ class ContactMethod(ModelSQL, ModelView):
|
||||
prospect = fields.Many2One('sale.prospect', 'Prospect', required=True)
|
||||
prospect_trace = fields.Many2One(
|
||||
'sale.prospect_trace', 'Prospect Trace', required=False)
|
||||
task = fields.Many2One('sale.pending_task', 'task ', required=False)
|
||||
|
||||
@classmethod
|
||||
def default_contact_type(cls):
|
||||
|
||||
@@ -263,7 +263,6 @@ class MakeCall(Wizard):
|
||||
task = Task()
|
||||
task.description = description
|
||||
task.prospect_trace = prospect_trace
|
||||
task.contacts = prospect_trace.prospect_contacts
|
||||
task.save()
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -297,8 +297,6 @@ Hacer llamada y programar tarea::
|
||||
>>> task.click('close_task')
|
||||
>>> task.state
|
||||
'done'
|
||||
>>> task.contacts[0].value == prospect_trace.prospect_contacts[0].value
|
||||
True
|
||||
|
||||
Hacer llamada y cerrar venta (Seguimiento de prospecto)::
|
||||
>>> make_call = Wizard('sale.prospect_trace.make_call', [prospect_trace])
|
||||
@@ -350,6 +348,7 @@ Reasignar prospectos por prospecto::
|
||||
>>> reassign_by_prospect.form.new_operator = user
|
||||
>>> reassign_by_prospect.execute('reassign_by_prospect')
|
||||
|
||||
|
||||
>>> prospect1.reload()
|
||||
>>> prospect1.assigned_operator.name
|
||||
'Administrator'
|
||||
@@ -366,6 +365,14 @@ Crear un usuario de rol administrador::
|
||||
>>> admin.user_admin == 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
|
||||
|
||||
@@ -8,8 +8,5 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<newline/>
|
||||
<label name="description"/>
|
||||
<field name="description"/>
|
||||
<newline/>
|
||||
<label name="contacts"/>
|
||||
<field name="contacts"/>
|
||||
</group>
|
||||
</form>
|
||||
@@ -4,6 +4,5 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<tree>
|
||||
<field name="prospect_trace" expand="1"/>
|
||||
<field name="description" expand="1"/>
|
||||
<field name="contacts" expand="1"/>
|
||||
<button name="close_task"/>
|
||||
</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>
|
||||
Reference in New Issue
Block a user