Error registrando boton en ProspectTrace
This commit is contained in:
parent
881f34d582
commit
05ff4b8f8d
@ -134,7 +134,6 @@ this repository contains the full copyright notices and license terms. -->
|
|||||||
<field name="model">sale.prospect, -1</field>
|
<field name="model">sale.prospect, -1</field>
|
||||||
<field name="action" ref="assign_operator_wizard"/>
|
<field name="action" ref="assign_operator_wizard"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<menuitem
|
<menuitem
|
||||||
parent="menu_prospects_tree"
|
parent="menu_prospects_tree"
|
||||||
sequence="40"
|
sequence="40"
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
from trytond.wizard import Wizard, StateView, Button, StateTransition
|
from trytond.wizard import Wizard, StateView, Button, StateTransition
|
||||||
from trytond.model import ModelSQL, ModelView, fields, DeactivableMixin
|
from trytond.model import ModelSQL, ModelView, fields, DeactivableMixin
|
||||||
from trytond.pool import Pool
|
from trytond.pool import Pool
|
||||||
|
from trytond.pyson import Eval
|
||||||
|
|
||||||
from .selections.call_types import CallTypes
|
from .selections.call_types import CallTypes
|
||||||
from .selections.interest import Interest
|
from .selections.interest import Interest
|
||||||
@ -35,10 +36,25 @@ class ProspectTrace(DeactivableMixin, ModelSQL, ModelView):
|
|||||||
], 'State',
|
], 'State',
|
||||||
states=_states)
|
states=_states)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def __setup__(cls):
|
||||||
|
super(ProspectTrace, cls).__setup__()
|
||||||
|
cls._buttons.update({
|
||||||
|
'wizard_schedule': {
|
||||||
|
'invisible': Eval('state') == 'open',
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def default_state(cls):
|
def default_state(cls):
|
||||||
return 'open'
|
return 'open'
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
@ModelView.button_action(
|
||||||
|
'sale_opportunity_management.schedule_call_wizard')
|
||||||
|
def wizard_schedule():
|
||||||
|
pass
|
||||||
|
|
||||||
@fields.depends('calls', 'pending_call', 'current_interest', 'state')
|
@fields.depends('calls', 'pending_call', 'current_interest', 'state')
|
||||||
def on_change_calls(self):
|
def on_change_calls(self):
|
||||||
if not self.calls:
|
if not self.calls:
|
||||||
|
@ -54,12 +54,19 @@ this repository contains the full copyright notices and license terms. -->
|
|||||||
id="menu_prospect_trace_tree"
|
id="menu_prospect_trace_tree"
|
||||||
action="act_prospect_trace_tree"/>
|
action="act_prospect_trace_tree"/>
|
||||||
|
|
||||||
<!-- <record model="ir.action.wizard" id="schedule_call_wizard"> -->
|
<record model="ir.action.wizard" id="schedule_call_wizard">
|
||||||
|
<field name="name">Schedule call</field>
|
||||||
|
<field name="wiz_name">sale.prospect_trace.schedule</field>
|
||||||
|
</record>
|
||||||
<record model="ir.ui.view" id="schedule_start_view_form">
|
<record model="ir.ui.view" id="schedule_start_view_form">
|
||||||
<field name="model">sale.prospect_trace.schedule.start</field>
|
<field name="model">sale.prospect_trace.schedule.start</field>
|
||||||
<field name="type">form</field>
|
<field name="type">form</field>
|
||||||
<field name="name">schedule_start_form</field>
|
<field name="name">schedule_start_form</field>
|
||||||
</record>
|
</record>
|
||||||
|
<record model="ir.model.button" id="schedule_call_wizard_button">
|
||||||
|
<field name="name">wizard_schedule</field>
|
||||||
|
<field name="string">Schedule call</field>
|
||||||
|
<field name="model" search="[('model', '=', 'sale.prospect_trace')]"/>
|
||||||
|
</record>
|
||||||
</data>
|
</data>
|
||||||
</tryton>
|
</tryton>
|
@ -2,5 +2,7 @@
|
|||||||
<!-- 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. -->
|
||||||
<form>
|
<form>
|
||||||
|
<label name="date_time"/>
|
||||||
|
<field name="date_time"/>
|
||||||
|
<button name="wizard_schedule" icon="tryton-forward"/>
|
||||||
</form>
|
</form>
|
Loading…
Reference in New Issue
Block a user