From 8fa5d20ea640307d00b359c53cf57751e2c14921 Mon Sep 17 00:00:00 2001 From: camilogs Date: Thu, 24 Aug 2023 14:11:05 -0500 Subject: [PATCH] feat(Call): Se hace visible unidad de negocio, actualizandose junto con el seguimiento de prospecto, closed #56 --- call.py | 6 ++++++ prospect_trace.py | 1 + tests/scenario_sale_opportunity_management.rst | 2 ++ view/call_form.xml | 2 ++ view/call_tree.xml | 1 + 5 files changed, 12 insertions(+) diff --git a/call.py b/call.py index a4ed89a..9522b68 100644 --- a/call.py +++ b/call.py @@ -26,6 +26,12 @@ class Call(ModelSQL, ModelView): call_result = fields.Selection( CallResults.get_call_results(), 'Call result', states=_states) + call_business_unit = fields.Selection( + [('brigade', 'Brigade'), + ('optics', 'Optics'), + ('equipment', 'Equipment')], + 'Business unit' + ) @classmethod def __setup__(cls): diff --git a/prospect_trace.py b/prospect_trace.py index 03520df..af66260 100644 --- a/prospect_trace.py +++ b/prospect_trace.py @@ -171,6 +171,7 @@ class MakeCall(Wizard): call.description = self.start.description call.interest = self.start.interest call.prospect_trace = self.record + call.call_business_unit = self.record.prospect_business_unit if call.interest == '0': call.call_result = 'missed_call' diff --git a/tests/scenario_sale_opportunity_management.rst b/tests/scenario_sale_opportunity_management.rst index f6e5012..5969fb5 100644 --- a/tests/scenario_sale_opportunity_management.rst +++ b/tests/scenario_sale_opportunity_management.rst @@ -219,6 +219,8 @@ Verificar estado final del seguimiento del prospecto y sus llamadas 'first_call' >>> prospect_trace.calls[0].date == date.today() True + >>> prospect_trace.calls[0].call_business_unit + 'brigade' >>> prospect_trace.calls[1].call_result 'answered_call' diff --git a/view/call_form.xml b/view/call_form.xml index 6dd2942..ca87874 100644 --- a/view/call_form.xml +++ b/view/call_form.xml @@ -18,4 +18,6 @@ this repository contains the full copyright notices and license terms. -->