diff --git a/prospect_trace.py b/prospect_trace.py index 1db0c52..9ed2f9a 100644 --- a/prospect_trace.py +++ b/prospect_trace.py @@ -21,7 +21,8 @@ class ProspectTrace(DeactivableMixin, ModelSQL, ModelView): prospect_city = fields.Many2One('sale.city', 'City', states=_states) - calls = fields.One2Many('sale.call', 'prospect_trace', 'Calls') + calls = fields.One2Many( + 'sale.call', 'prospect_trace', 'Calls', states=_states) pending_call = fields.Many2One( 'sale.pending_call', 'Pending call', states=_states) @@ -43,7 +44,8 @@ class ProspectTrace(DeactivableMixin, ModelSQL, ModelView): cls._buttons.update({ 'wizard_schedule': { 'invisible': Eval('state') == 'with_pending_calls', - } + }, + 'wizard_make_call': {} }) @classmethod @@ -56,6 +58,12 @@ class ProspectTrace(DeactivableMixin, ModelSQL, ModelView): def wizard_schedule(cls, prospect_traces): pass + @classmethod + @ModelView.button_action( + 'sale_opportunity_management.make_call_wizard') + def wizard_make_call(cls, prospect_traces): + pass + @fields.depends('prospect', 'prospect_city', 'prospect_contact') def on_change_prospect(self): if not self.prospect: diff --git a/prospect_trace.xml b/prospect_trace.xml index 95a194f..f64fb5e 100644 --- a/prospect_trace.xml +++ b/prospect_trace.xml @@ -78,6 +78,10 @@ this repository contains the full copyright notices and license terms. --> form make_call_start_form - + + wizard_make_call + Make call + + \ No newline at end of file diff --git a/view/make_call_start_form.xml b/view/make_call_start_form.xml index f70e785..4474539 100644 --- a/view/make_call_start_form.xml +++ b/view/make_call_start_form.xml @@ -2,5 +2,9 @@
+