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