Compare commits

..

No commits in common. "6.8" and "modularizacionDeArchivos_AsignarProspectosAlOperadorQueLoCreo" have entirely different histories.

2 changed files with 9 additions and 16 deletions

View File

@ -22,8 +22,6 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.action.act_window" id="act_call_tree">
<field name="name">Calls</field>
<field name="res_model">sale.call</field>
<field name="domain"
eval="[('operator_who_called', '=', Eval('_user'))]" pyson="1"/>
</record>
<record model="ir.ui.view" id="call_view_tree">
<field name="model">sale.call</field>
@ -80,9 +78,6 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.action.act_window" id="act_pending_task_tree">
<field name="name">Pending tasks</field>
<field name="res_model">sale.pending_task</field>
<field name="domain"
eval="[If(Eval('context', {}).get('user_admin', None), (), ('prospect_trace.prospect_assigned_operator', '=', Eval('_user')))]"
pyson="1"/>
</record>
<record model="ir.ui.view" id="pending_task_view_tree">
<field name="model">sale.pending_task</field>

View File

@ -1,10 +1,11 @@
# 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 Workflow, ModelSQL, ModelView, fields
from trytond.model import ModelSQL, ModelView, fields
from trytond.pyson import Eval
class PendingTask(Workflow, ModelSQL, ModelView):
class PendingTask(ModelSQL, ModelView):
'Tarea a realizar a un seguimiento de prospecto'
__name__ = "sale.pending_task"
@ -26,21 +27,18 @@ class PendingTask(Workflow, ModelSQL, ModelView):
@classmethod
def __setup__(cls):
super(PendingTask, cls).__setup__()
cls._transitions |= set((
('pending', 'done'),
))
cls._buttons.update({
'close_task': {
'invisible': ~Eval('state').in_(['pending']),
'depends':['state']
'invisible': Eval('state') == 'done'
}
})
@classmethod
@ModelView.button
@Workflow.transition('done')
def close_task(cls, tasks):
pass
for task in tasks:
task.state = 'done'
task.save()
@classmethod
def default_state(cls):